3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<html><body> <? if(preg_match('[0-9a-zA-Z]', 'bob')) { echo preg_match('[0-9a-zA-Z]', 'bob'); } echo <br /><hr />; if(preg_match('~[0-9a-zA-Z]~', 'bob')) { echo preg_match('[0-9a-zA-Z]', 'bob'); } echo "<br /><hr />"; if(preg_match('~[0-9a-zA-Z]+~', 'bob')) { echo preg_match('[0-9a-zA-Z]', 'bob'); } ?> </body></html>
based on trTJX
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.34
Parse error: syntax error, unexpected '<' in /in/93BKZ on line 6
Process exited with code 255.
Output for 5.4.0 - 5.4.32
<html><body> <? if(preg_match('[0-9a-zA-Z]', 'bob')) { echo preg_match('[0-9a-zA-Z]', 'bob'); } echo <br /><hr />; if(preg_match('~[0-9a-zA-Z]~', 'bob')) { echo preg_match('[0-9a-zA-Z]', 'bob'); } echo "<br /><hr />"; if(preg_match('~[0-9a-zA-Z]+~', 'bob')) { echo preg_match('[0-9a-zA-Z]', 'bob'); } ?> </body></html>