3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $foo_in_class; public function do_foo() { $outside_foo = null; try { $outside_foo = 'Outside Foo'; $foo_in_try = 'Foo In Try'; $this->foo_in_class = 'Foo in Class'; throw new Exception(); } catch (Exception $e) { var_dump($outside_foo); var_dump($foo_in_try); var_dump($this->foo_in_class); } } } (new Foo)->do_foo();
Output for git.master_jit, git.master, rfc.property-hooks
string(11) "Outside Foo" string(10) "Foo In Try" string(12) "Foo in Class"

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:
36.25 ms | 405 KiB | 5 Q