3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(preg_match('~^(hello\#world)\z~', 'hello#world')); var_dump(preg_match('~^(hello\#world)\z~x', 'hello#world')); var_dump(preg_match('~^(hello#world)\z~', 'hello#world')); var_dump(preg_match('~^(hello#world)\z~x', 'hello#world'));
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
int(1) int(1) int(1) Warning: preg_match(): Compilation failed: missing ) at offset 16 in /in/f1eg0 on line 7 bool(false)
Output for hhvm-3.22.0
int(1) int(1) int(1) Warning: Compilation failed: missing ) at offset 16 in /in/f1eg0 on line -1 bool(false)
Output for hhvm-3.18.5 - 3.21.3
int(1) int(1) int(1) Warning: Compilation failed: missing ) at offset 16 in /in/f1eg0 on line 7 bool(false)