title: PHP 5.4: disable warning "Creating default object from empty value"
body: <p>I want to migrate code from PHP 5.2 to 5.4. This worked fine so far except that all the code I use makes extensive use of just using an object with a member without any initialisation, like:</p>
  
  <pre><code>$MyObject-&gt;MyMember = "Hello";
  </code></pre>
  
  <p>which results in the warning: "Creating default object from empty value"</p>
  
  <p>I know that the solution would be to use:</p>
  
  <pre><code>$MyObject = new stdClass();
  $MyObject-&gt;MyMember = "Hello";
  </code></pre>
  
  <p>but it would be A LOT OF WORK to change this in all my code, because I use this many times in different projects. I know, it's not good style, but unfortunately I'm not able to spend the next weeks adding this to all of my code.</p>
  
  <p>I know I could set the php error_reporting to not reporting warnings, but I want to be able to still get other warnings and notices. This warning doesn't seem to be effected by enable or disable E_STRICT at all. So is there a way to just disable this warning?!</p>