3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/^((?:(?!\<\?php echo[\s?](?:.*?)\;[\s?]\?\>).)*)<\?php echo[\s?](?:.*?)\;[\s?]\?\>(.*)/'; $str = 'customFields[<?php echo $field["id"]; ?>][type]'; preg_match_all($re, $str, $matches, PREG_SET_ORDER); array_shift($matches[0]); print_r($matches);

preferences:
24.22 ms | 406 KiB | 5 Q