3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_replace_callback( '#\d+#', 'incr', '123abc456def789' ); function incr($args){ return 1 + (int)$args[0]; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LSR0G
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_replace_callback'
    4     1        SEND_VAL                                                 '%23%5Cd%2B%23'
    5     2        SEND_VAL                                                 'incr'
    6     3        SEND_VAL                                                 '123abc456def789'
          4        DO_ICALL                                         $0      
          5        ECHO                                                     $0
   11     6      > RETURN                                                   1

Function incr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LSR0G
function name:  incr
number of ops:  6
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        FETCH_DIM_R                                      ~1      !0, 0
          2        CAST                                          4  ~2      ~1
          3        ADD                                              ~3      1, ~2
          4      > RETURN                                                   ~3
   11     5*     > RETURN                                                   null

End of function incr

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.49 ms | 1394 KiB | 15 Q