3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "100-200"; if(1 === preg_match('~[0-9]~', $string)){ echo '£' $string; }
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected '$string' (T_VARIABLE), expecting ',' or ';' in /in/4e3JX on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /in/4e3JX on line 6
Process exited with code 255.

preferences:
207.39 ms | 1399 KiB | 63 Q