3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class C { public function f ( $foo ) { var_dump($foo instanceof __CLASS__); } } class D extends C { } $c = new C(); $c->f(new D()); $d = new D(); $d->f($d); $d->f($c);
Output for 5.4.0 - 5.4.20
Parse error: syntax error, unexpected '__CLASS__' (T_CLASS_C) in /in/OpVDv on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_CLASS_C in /in/OpVDv on line 7
Process exited with code 255.