fork download
  1. <?php
  2. Class Foo{}
  3. $class = new ReflectionClass('Foo');
  4.  
  5. $classEhFoo = $class instanceof Foo;
  6. $classEhObj = is_object($class);
  7.  
  8. var_dump($class);
  9. var_dump($classEhFoo); // false
  10. var_dump($classEhObj); // true
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
object(ReflectionClass)#1 (1) {
  ["name"]=>
  string(3) "Foo"
}
bool(false)
bool(true)