3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = '(ab(cd)ef)'; preg_match_all('@\( ( ( (?>[^()]+) | (?R) )+ ) \)@x', $string, $matches); mb_ereg('\([^()]+\)', $string, $regs); var_dump($matches, $regs);
Output for 4.3.4 - 7.1.0
array(3) { [0]=> array(1) { [0]=> string(10) "(ab(cd)ef)" } [1]=> array(1) { [0]=> string(8) "ab(cd)ef" } [2]=> array(1) { [0]=> string(2) "ef" } } array(1) { [0]=> string(4) "(cd)" }
Output for 4.3.2 - 4.3.3
Fatal error: Call to undefined function: mb_ereg() in /in/CLQQc on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: mb_ereg() in /in/CLQQc on line 4