3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php preg_match('/one|(?<two>two)/', 'one', $matches); var_dump($matches['two']);
Output for 5.3.0 - 7.2.0
Notice: Undefined index: two in /in/TUupt on line 5 NULL
Output for 4.4.6 - 4.4.9, 5.2.2 - 5.2.17
Notice: Undefined index: two in /in/TUupt on line 5 NULL
Output for 5.2.0 - 5.2.1
Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 7 in /in/TUupt on line 3 NULL
Output for 4.3.11 - 4.4.5, 5.0.0 - 5.1.6
Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 7 in /in/TUupt on line 3 Notice: Undefined index: two in /in/TUupt on line 5 NULL
Output for 4.3.0 - 4.3.10
Warning: Compilation failed: unrecognized character after (?< at offset 7 in /in/TUupt on line 3 Notice: Undefined index: two in /in/TUupt on line 5 NULL