3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f() { $arr = ['u' => 'U']; $x = 'x'; $y = 'y'; $result = (fn () => [$x, $x = 'xx', $x, $y, $arr, $arr['w'] = 'W', $arr, $newvar = 'newvar'])(); var_export(get_defined_vars()); } f();
Output for git.master_jit, git.master, rfc.property-hooks
array ( 'arr' => array ( 'u' => 'U', ), 'x' => 'x', 'y' => 'y', 'result' => array ( 0 => 'x', 1 => 'xx', 2 => 'xx', 3 => 'y', 4 => array ( 'u' => 'U', ), 5 => 'W', 6 => array ( 'u' => 'U', 'w' => 'W', ), 7 => 'newvar', ), )

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