3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_export(preg_match('~foo~', 'foo', $string)); var_export(preg_match('~foo~', 'bar', $string)); var_export(preg_match('~foo', 'foo', $string)); if (PREG_INTERNAL_ERROR === preg_last_error() { echo "internal error\n"; }
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '{' in /in/PPPlQ on line 7
Process exited with code 255.

preferences:
169.74 ms | 1395 KiB | 65 Q