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);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZfPnG
function name:  (null)
number of ops:  16
compiled vars:  !0 = $re, !1 = $str, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%5E%28%28%3F%3A%28%3F%21%5C%3C%5C%3Fphp+echo%5B%5Cs%3F%5D%28%3F%3A.%2A%3F%29%5C%3B%5B%5Cs%3F%5D%5C%3F%5C%3E%29.%29%2A%29%3C%5C%3Fphp+echo%5B%5Cs%3F%5D%28%3F%3A.%2A%3F%29%5C%3B%5B%5Cs%3F%5D%5C%3F%5C%3E%28.%2A%29%2F'
    4     1        ASSIGN                                                   !1, 'customFields%5B%3C%3Fphp+echo+%24field%5B%22id%22%5D%3B+%3F%3E%5D%5Btype%5D'
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        SEND_VAL                                                 2
          7        DO_ICALL                                                 
    6     8        INIT_FCALL                                               'array_shift'
          9        FETCH_DIM_W                                      $6      !2, 0
         10        SEND_REF                                                 $6
         11        DO_ICALL                                                 
    7    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.47 ms | 1438 KiB | 16 Q