3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php preg_match('/one|(?<two>two)/', 'one', $matches); var_dump(isset($matches['two']));
Output for 4.4.6 - 4.4.9, 5.2.2 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
bool(false)
Output for 4.4.3 - 4.4.5, 5.0.0 - 5.2.1
<br /> <b>Warning</b>: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unrecognized character after (?&lt; at offset 7 in <b>/in/B9s3U</b> on line <b>3</b><br /> bool(false)
Output for 4.3.11 - 4.4.2
<br /> <b>Warning</b>: preg_match(): Compilation failed: unrecognized character after (?&lt; at offset 7 in <b>/in/B9s3U</b> on line <b>3</b><br /> bool(false)
Output for 4.3.0 - 4.3.10
<br /> <b>Warning</b>: Compilation failed: unrecognized character after (?< at offset 7 in <b>/in/B9s3U</b> on line <b>3</b><br /> bool(false)