3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<? $x = ''; echo preg_match('[0-9a-zA-Z]', $x); echo preg_match('~[0-9a-zA-Z]~', $x); echo preg_match('~[0-9a-zA-Z]+~', $x); ?>
based on t2drR
Output for 5.4.0 - 7.1.0
000
Output for 4.3.0 - 5.3.29
<? $x = ''; echo preg_match('[0-9a-zA-Z]', $x); echo preg_match('~[0-9a-zA-Z]~', $x); echo preg_match('~[0-9a-zA-Z]+~', $x); ?>