3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = array(-3, 3, 5, 7); function array_max($array) { $max = $array[0]; for ($i = 0; $i < count($array); $i++) { if ($array[$i] > $max) { $max = $array[$i]; } } echo $max; } array_max($x);
based on eLBYD
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
7