3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f($b) { if ($b) throw new Exception("e"); } function g($b) { try { f($b); } catch (Exception $e) { } var_dump($e); } g(false); g(true);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $e in /in/tFsFi on line 17 NULL object(Exception)#1 (7) { ["message":protected]=> string(1) "e" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/tFsFi" ["line":protected]=> int(5) ["trace":"Exception":private]=> array(2) { [0]=> array(4) { ["file"]=> string(9) "/in/tFsFi" ["line"]=> int(12) ["function"]=> string(1) "f" ["args"]=> array(1) { [0]=> bool(true) } } [1]=> array(4) { ["file"]=> string(9) "/in/tFsFi" ["line"]=> int(21) ["function"]=> string(1) "g" ["args"]=> array(1) { [0]=> bool(true) } } } ["previous":"Exception":private]=> NULL }

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:
50.79 ms | 403 KiB | 8 Q