3v4l.org

run code in 300+ PHP versions simultaneously
<?php // using debug_backtrace(); function a($inicial) { echo "Inicial => ", $inicial; $total = ++$inicial; b($total); } function b($total) { echo "Total => ", $total; print_r(debug_backtrace()); } a(1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/luFqE
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'a'
          1        SEND_VAL                                                 1
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/luFqE
function name:  a
number of ops:  9
compiled vars:  !0 = $inicial, !1 = $total
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ECHO                                                     'Inicial+%3D%3E+'
          2        ECHO                                                     !0
    7     3        PRE_INC                                          ~2      !0
          4        ASSIGN                                                   !1, ~2
    8     5        INIT_FCALL_BY_NAME                                       'b'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
    9     8      > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/luFqE
function name:  b
number of ops:  9
compiled vars:  !0 = $total
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        ECHO                                                     'Total+%3D%3E+'
          2        ECHO                                                     !0
   14     3        INIT_FCALL                                               'print_r'
          4        INIT_FCALL                                               'debug_backtrace'
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                                 
   15     8      > RETURN                                                   null

End of function b

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.88 ms | 1389 KiB | 18 Q