title: PHP object default return value
body: <p>I have a function which returns object array like that:</p>
  
  <pre><code>&lt;?php
  
  function sth()
  {
     return (object) array(
       "obj1" =&gt; $obj1,
       "obj2" =&gt; $obj2,
       "obj3" =&gt; $obj3
     );
  }
  
  $obj = sth();
  echo $obj;
  
  ?&gt;
  </code></pre>
  
  <p>Here I want to define $obj's default value.It will return default value instead of $obj1,$obj2,$obj3. </p>
  
  <p>How can I define a default value?</p>