3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mark = array(90,85); array_walk_recursive($mark, function (&$k) { if ($k >= 90) { echo "$k: 4.0\n"; $k = '4.0'; } else if ($k >= 80 && $k<90) { echo "$k: 3.6\n"; $k = '3.6'; } else if ($k < 80) { echo "$k: 2.8\n"; $k = '2.8'; } }); print_r($mark);
Output for git.master, git.master_jit, rfc.property-hooks
90: 4.0 85: 3.6 Array ( [0] => 4.0 [1] => 3.6 )

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:
22.74 ms | 401 KiB | 8 Q