3v4l.org

run code in 300+ PHP versions simultaneously
<?php $total_width = 1500; $resolutions = [100, 50, 10, 1000]; rsort($resolutions); if ($total_width > $resolutions[0]){ //true foreach($resolutions as $break_point){ if ($total_width <= $break_point){ echo "this will never happen"; } }
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected end of file in /in/dhlWO on line 13
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/dhlWO on line 3
Process exited with code 255.

preferences:
184.01 ms | 1395 KiB | 67 Q