3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $r1 = '/(?!<r)rn/'; $r2 = '((?:rr(*SKIP)(*FAIL)|)rn)'; var_dump(preg_match($r1, "rn")); var_dump(preg_match($r2, "rn"));
Output for 4.4.9, 5.2.5 - 7.1.0
int(1) int(1)
Output for 4.3.11 - 4.4.8, 5.0.0 - 5.2.4
int(1) Warning: preg_match(): Compilation failed: nothing to repeat at offset 6 in /in/dGTQR on line 7 bool(false)
Output for 4.3.0 - 4.3.10
int(1) Warning: Compilation failed: nothing to repeat at offset 6 in /in/dGTQR on line 7 bool(false)