3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL & ~E_NOTICE); $data = [ 'none' => ['x'=>false,'y'=>false], 'only x' => ['x'=>true, 'y'=>false], 'only y' => ['x'=>false,'y'=>true ], ]; foreach ($data as $k => $v) { if ($v['x']) { $x = true; } if ($v['y']) { $y = true; } if ($x && $y) { var_dump('x && y when k = '. $k); } }
Output for git.master_jit, git.master, rfc.property-hooks
Warning: Undefined variable $x in /in/BkeL1 on line 23 Warning: Undefined variable $y in /in/BkeL1 on line 23 string(22) "x && y when k = only y"

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:
43.85 ms | 1584 KiB | 4 Q