3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/^[^[]+\[|<\?php echo\s(.*?)\;\s\?\>(*SKIP)(*FAIL)|\]\[[^]]*\]/'; $str = 'customFields[<?php echo $field["id"]; ?>][type]'; preg_match_all($re, $str, $matches, PREG_SET_ORDER); print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NVWPS
function name:  (null)
number of ops:  12
compiled vars:  !0 = $re, !1 = $str, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%5E%5B%5E%5B%5D%2B%5C%5B%7C%3C%5C%3Fphp+echo%5Cs%28.%2A%3F%29%5C%3B%5Cs%5C%3F%5C%3E%28%2ASKIP%29%28%2AFAIL%29%7C%5C%5D%5C%5B%5B%5E%5D%5D%2A%5C%5D%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                                               'print_r'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.75 ms | 997 KiB | 15 Q