Parent object type hinting in PHP
<p>I'm trying to type hint for a specific parent object in PHP:</p>

<p>I've current got a standard base object class:</p>

<pre><code>class stdObject
{

   private $var;

   public function setVar($var)
   {
     $this-&gt;var = $var;
     return $this;
   }
}
</code></pre>

<p>And I have a class object that extends this:</p>

<pre><code>class valObject extends stdObject
{
}
</code></pre>

<p>In a PHP function, I want to be able to type hint so that the function can expect any object that has a parent of <code>stdObject</code>, so sending in <code>valObject</code> would work but not <code>anyOldObject</code>.</p>

<p>Is this possible?</p>
