3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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.4.28
Parse error: syntax error, unexpected '{' in /in/PPPlQ on line 7
Process exited with code 255.