3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { static public function foo() { return $this instanceof Foo; } } class Bar { public function bar() { return Foo::foo(); } } $bar = new Bar; var_dump($bar->bar());
Output for 5.3.0 - 5.3.24, 5.3.26 - 5.4.16
Fatal error: Constructor Foo::foo() cannot be static in /in/2imLQ on line 8
Process exited with code 255.
Output for 5.3.25
Fatal error: Constructor Foo::foo() cannot be static in /in/KYOXt on line 8
Process exited with code 255.