3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = true; if ($a > $b): echo $a." is greater than ".$b; else if ($a == $b): // Will not compile. echo "The above line causes a parse error."; endif;
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
Parse error: syntax error, unexpected 'if' (T_IF), expecting ':' in /in/NMgCB on line 7
Process exited with code 255.

preferences:
168.72 ms | 1395 KiB | 36 Q