3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = array(1=>2, 2=>4, 5=>12) if(in_array(1,$x) { echo "in" ; } else { echo "not in"; }
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected 'if' (T_IF) in /in/tlHiG on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected T_IF in /in/tlHiG on line 6
Process exited with code 255.

preferences:
177.73 ms | 1395 KiB | 52 Q