3v4l.org

run code in 300+ PHP versions simultaneously
<?php $term = "ford"; if ($term=="mpv" || $term=="bmw" || $term=="mg") { echo strtoupper($term); } else if (1 === preg_match('~[0-9]~', $term) echo "£$term"; } else { echo ucfirst($term); } ?> <!-- if(1 === preg_match('~[0-9]~', $string)){ echo "£$string"; } ?>
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected 'echo' (T_ECHO) in /in/04bDq on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ECHO in /in/04bDq on line 8
Process exited with code 255.

preferences:
183.78 ms | 1395 KiB | 63 Q