title: PHP DOMElement is Immutable. = 'No Modification Allowed Error'
body: <p>I cannot understand why this fails. Does a DOMElement need to be part of a Document?</p>
  
  <pre><code>$domEl = new DOMElement("Item"); 
  $domEl-&gt;setAttribute('Something','bla'); 
  </code></pre>
  
  <p>Throws exception</p>
  
  <pre><code>&gt; Uncaught exception 'DOMException' with message 'No Modification Allowed Error';
  </code></pre>
  
  <p>I would have thought I could just create a DOMElement and it would be mutable.</p>