3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = array(5, 3, 9, 11, 6, 15); $arr2 = array(11, 20, 1, 3, 8); foreach($arr1 as global $a) { $y = $a; $max = max(array_filter($arr2, function ($x) use ($y) { return $x < $y; })); echo $max; }
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected 'global' (T_GLOBAL) in /in/WWWHc on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_GLOBAL in /in/WWWHc on line 7
Process exited with code 255.

preferences:
190.15 ms | 1386 KiB | 66 Q