3v4l.org

run code in 300+ PHP versions simultaneously
<?php function func_a( $arg1, $arg2, $arg3 = null ) { $summ = $arg1 + $arg2; function func_arg( $a1, $a2 ) { $output = $GLOBALS['summ'] + $a1 + $a2; return $output; } } print func_a( 3, 5, func_arg( 7, 9 ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GvJYs
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'func_a'
          1        SEND_VAL                                                 3
          2        SEND_VAL                                                 5
          3        INIT_FCALL_BY_NAME                                       'func_arg'
          4        SEND_VAL_EX                                              7
          5        SEND_VAL_EX                                              9
          6        DO_FCALL                                      0  $0      
          7        SEND_VAR                                                 $0
          8        DO_FCALL                                      0  $1      
          9        ECHO                                                     $1
         10      > RETURN                                                   1

Function func_a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GvJYs
function name:  func_a
number of ops:  7
compiled vars:  !0 = $arg1, !1 = $arg2, !2 = $arg3, !3 = $summ
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      null
    4     3        ADD                                              ~4      !0, !1
          4        ASSIGN                                                   !3, ~4
    6     5        DECLARE_FUNCTION                                         'func_arg'
   10     6      > RETURN                                                   null

End of function func_a

Function %00func_arg%2Fin%2FGvJYs%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GvJYs
function name:  func_arg
number of ops:  9
compiled vars:  !0 = $a1, !1 = $a2, !2 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        FETCH_R                      global              ~3      'GLOBALS'
          3        FETCH_DIM_R                                      ~4      ~3, 'summ'
          4        ADD                                              ~5      ~4, !0
          5        ADD                                              ~6      ~5, !1
          6        ASSIGN                                                   !2, ~6
    8     7      > RETURN                                                   !2
    9     8*     > RETURN                                                   null

End of function %00func_arg%2Fin%2FGvJYs%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
128.34 ms | 1403 KiB | 14 Q