3v4l.org

run code in 500+ PHP versions simultaneously
<?php $re = '/{Delta=(\[[^][,]*,[^][]*])[^{}]*}/'; $str = '{Delta=[r3, r4], X=alarmOff, Y=heatOn}'; preg_match($re, $str, $matches); print_r($matches[1]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qeIrD
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%7BDelta%3D%28%5C%5B%5B%5E%5D%5B%2C%5D%2A%2C%5B%5E%5D%5B%5D%2A%5D%29%5B%5E%7B%7D%5D%2A%7D%2F'
    4     1        ASSIGN                                                       !1, '%7BDelta%3D%5Br3%2C+r4%5D%2C+X%3DalarmOff%2C+Y%3DheatOn%7D'
    6     2        INIT_FCALL                                                   'preg_match'
          3        SEND_VAR                                                     !0
          4        SEND_VAR                                                     !1
          5        SEND_REF                                                     !2
          6        DO_ICALL                                                     
    8     7        INIT_FCALL                                                   'print_r'
          8        FETCH_DIM_R                                          ~6      !2, 1
          9        SEND_VAL                                                     ~6
         10        DO_ICALL                                                     
         11      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.95 ms | 2015 KiB | 15 Q