3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '#\d+#'; $haystack = '0123 456 789'; preg_replace_callback($pattern, 'add_three', $haystack); function add_three($matches){ return '777'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lruus
function name:  (null)
number of ops:  8
compiled vars:  !0 = $pattern, !1 = $haystack
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%23%5Cd%2B%23'
    4     1        ASSIGN                                                   !1, '0123+456+789'
    6     2        INIT_FCALL                                               'preg_replace_callback'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'add_three'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                                 
   10     7      > RETURN                                                   1

Function add_three:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lruus
function name:  add_three
number of ops:  3
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1      > RETURN                                                   '777'
   10     2*     > RETURN                                                   null

End of function add_three

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.3 ms | 1394 KiB | 15 Q