3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr1 = array(5, 3, 9, 11, 6, 15); $arr2 = array(11, 20, 1, 3, 8); foreach($arr1 as $a) { $max = max(array_filter($arr2, function ($x, $y=$a) { return $x < $y; })); echo $max; }
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected '$a' (T_VARIABLE) in /in/qhlJe on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/qhlJe on line 8
Process exited with code 255.