title: Get all objects of a particular class
body: <p>i have to list objects that are instance of a class by refrence  </p>
  
  <pre><code>class Foo {}
  class Foo1 {}
  $obj1 = new Foo;
  $obj2 = new Foo;
  $obj32 = new Foo1;
  </code></pre>
  
  <p>i need a solution to get all objects that are instance of Foo class
  do you know how to do that ?</p>