3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php preg_match('(a(b(c(?P<fancy>d))))i', 'abcdabcd', $matches); var_dump($matches);
Output for 4.3.3 - 7.1.0
array(5) { [0]=> string(4) "abcd" [1]=> string(3) "bcd" [2]=> string(2) "cd" ["fancy"]=> string(1) "d" [3]=> string(1) "d" }
Output for 4.3.0 - 4.3.2
array(4) { [0]=> string(4) "abcd" [1]=> string(3) "bcd" [2]=> string(2) "cd" [3]=> string(1) "d" }