3v4l.org

run code in 300+ PHP versions simultaneously
<?php print get_class($c = new class() {}); //class@anonymousphp-wasm run script:3$0 $d = new class() {}; var_dump($c instanceof $d); // false! interface i {} $e = new class() implements i {}; var_dump($e instanceof i); // true function foo() { return new class() {}; } $x = foo(); var_dump(foo() instanceof $x); // syntax error ! // var_dump($x instanceof foo()); ?>
Output for git.master_jit, git.master
class@anonymous/in/C93Ug:3$0bool(false) bool(true) bool(true)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
39.3 ms | 850 KiB | 4 Q