title: Type hinting for any object
body: <p>I've been working on code that's intended to be used with objects, without really caring what the kind of object is. I wanted to type hint that the method being written expected an object of any type, but ran into some difficulty.  </p>
  
  <p>I tried <code>function myFunc (object $obj)</code> and <code>function myFunc (stdClass $obj)</code> but both of these generated errors when I tried to pass objects in: </p>
  
  <blockquote>
    <p>Catchable fatal error: Argument 1 passed to MyClass::MyFunc() must be an instance of object, instance of ObjectActualClass given</p>
  </blockquote>
  
  <p>The same happened with <code>stdClass</code> as well</p>
  
  <p>What am I missing? I thought that all classes that didn't explicitly inherit from another class inherited from <code>stdClass</code>, meaning that the base class of every class in PHP would be <code>stdClass</code>. Is this not the case?</p>