3v4l.org

run code in 200+ PHP versions simultaneously
<?php class Foo { static public function isFoo() { return $this instanceof Foo; } } class Bar { public function doSomething() { return Foo::isFoo(); } } $bar = new Bar; var_dump($bar->doSomething());