3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function test() { echo $undef; } public function test2() { $x = $this; // use $this echo $undef; } } set_error_handler(function($_1, $_2, $_3, $_4, $ctx) { var_dump(isset($ctx['this'])); }); (new Foo)->test(); (new Foo)->test2();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 4 passed in /in/sQBL9 on line 5 and exactly 5 expected in /in/sQBL9:13 Stack trace: #0 /in/sQBL9(5): {closure}(2, 'Undefined varia...', '/in/sQBL9', 5) #1 /in/sQBL9(16): Foo->test() #2 {main} thrown in /in/sQBL9 on line 13
Process exited with code 255.

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:
122.42 ms | 406 KiB | 5 Q