3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php preg_match_all('/([^{}]*?)({([^{}]+|{[^{}]*})*?})/i', '{{}aaaaaaaaaaaaaaa', $result); var_dump($result);
Output for 4.3.0 - 5.1.6, 5.3.7 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 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 5.2.0 - 5.3.6
array(4) { [0]=> array(0) { } [1]=> array(0) { } [2]=> array(0) { } [3]=> array(0) { } }