3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s="a(bcdefghijkl(mno)p)q"; $return = preg_replace_callback( '|(\((.+)\))+|', function ($matches) { return $matches[2]; }, $s ); print_r($return);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rkgBj
function name:  (null)
number of ops:  12
compiled vars:  !0 = $s, !1 = $return
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'a%28bcdefghijkl%28mno%29p%29q'
    3     1        INIT_FCALL                                               'preg_replace_callback'
    4     2        SEND_VAL                                                 '%7C%28%5C%28%28.%2B%29%5C%29%29%2B%7C'
    5     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FrkgBj%3A5%240'
    7     4        SEND_VAL                                                 ~3
    8     5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
    3     7        ASSIGN                                                   !1, $4
   11     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FrkgBj%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rkgBj
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        FETCH_DIM_R                                      ~1      !0, 2
          2      > RETURN                                                   ~1
    7     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FrkgBj%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.18 ms | 1395 KiB | 17 Q