3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function is_regex($string) { return false !== @preg_match($string, 'anything'); } foreach (array('/foobar/', '/foobar/i', '`test{1,3}`', '/foo', '/foo(bar/') as $candidate) { var_dump(array($candidate, is_regex($candidate)); }
Output for 5.3.0 - 5.4.24
Parse error: syntax error, unexpected ';' in /in/qbut5 on line 8
Process exited with code 255.