title: PHP Equivalent of Java Type-Casting Solution
body: <p>Since PHP has no custom-class type-casting, how would I go about doing the PHP equivalent of this Java code:</p>
  
  <pre><code>CustomBaseObject cusBaseObject = cusBaseObjectDao.readCustomBaseObjectById(id);
  ((CustomChildObject) cusBaseObject).setChildAttribute1(value1);
  ((CustomChildObject) cusBaseObject).setChildAttribute2(value2);
  </code></pre>
  
  <p>In my case, it would <em>very</em> nice if I could do this. However, trying this without type-casting support, it gives me an error that the methods do not exist for the object.</p>
  
  <p>Thanks,</p>
  
  <p>Steve</p>