3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = ['a','b']; try { $y = @array_map(function($x){ throw new \Exception(); }, $x); } catch (\Exception $e){var_dump($e);} var_dump($y);
Output for git.master, git.master_jit, rfc.property-hooks
object(Exception)#2 (7) { ["message":protected]=> string(0) "" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/9310V" ["line":protected]=> int(6) ["trace":"Exception":private]=> array(2) { [0]=> array(2) { ["function"]=> string(9) "{closure}" ["args"]=> array(1) { [0]=> string(1) "a" } } [1]=> array(4) { ["file"]=> string(9) "/in/9310V" ["line"]=> int(6) ["function"]=> string(9) "array_map" ["args"]=> array(2) { [0]=> object(Closure)#1 (1) { ["parameter"]=> array(1) { ["$x"]=> string(10) "<required>" } } [1]=> array(2) { [0]=> string(1) "a" [1]=> string(1) "b" } } } } ["previous":"Exception":private]=> NULL } Warning: Undefined variable $y in /in/9310V on line 8 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:
39.67 ms | 404 KiB | 8 Q