3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '=iferror(ifs(OR("foo", "bar"),"a",OR("tar", OR("scar", "baa")),"b",OR("lar"),"d"),"c") blah blah ifs(OR("foo", "bar"),"a") and another one ifs("a", OR("tar", OR("scar", "baa")),"b",OR("lar"),"d")'; $regex = '/ifs(\(((?>[^()]+)|(?-2))*\))/'; preg_match_all($regex, $string, $matches); print_r($matches[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1OKQu
function name:  (null)
number of ops:  12
compiled vars:  !0 = $string, !1 = $regex, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Diferror%28ifs%28OR%28%22foo%22%2C+%22bar%22%29%2C%22a%22%2COR%28%22tar%22%2C+OR%28%22scar%22%2C+%22baa%22%29%29%2C%22b%22%2COR%28%22lar%22%29%2C%22d%22%29%2C%22c%22%29%0Ablah+blah+ifs%28OR%28%22foo%22%2C+%22bar%22%29%2C%22a%22%29+and+another+one+ifs%28%22a%22%2C+OR%28%22tar%22%2C+OR%28%22scar%22%2C+%22baa%22%29%29%2C%22b%22%2COR%28%22lar%22%29%2C%22d%22%29'
    4     1        ASSIGN                                                   !1, '%2Fifs%28%5C%28%28%28%3F%3E%5B%5E%28%29%5D%2B%29%7C%28%3F-2%29%29%2A%5C%29%29%2F'
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'print_r'
          8        FETCH_DIM_R                                      ~6      !2, 0
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.46 ms | 1010 KiB | 15 Q