3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php preg_match_all('/([^{}]*?)({([^{}]+|(?2))*?})/i', '{{}aaaaaaaaaaaaaa', $result); var_dump($result);
Output for 4.3.0 - 4.4.5, 4.4.9 - 5.1.6, 5.3.7 - 7.1.0
array(4) { [0]=> array(1) { [0]=> string(2) "{}" } [1]=> array(1) { [0]=> string(0) "" } [2]=> array(1) { [0]=> string(2) "{}" } [3]=> array(1) { [0]=> string(0) "" } }
Output for 4.4.6 - 4.4.8, 5.2.0 - 5.3.6
array(4) { [0]=> array(0) { } [1]=> array(0) { } [2]=> array(0) { } [3]=> array(0) { } }