3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php foreach (array('[1234](56 789)', '[1011](1213)') as $value) { $exp = '/[\(\[].+?[\)\]]/'; $res = preg_match($exp, $value, $matches); print_r($matches); }
based on rhWbZ
Output for 4.3.0 - 7.2.0
Array ( [0] => [1234] ) Array ( [0] => [1011] )