3v4l.org

run code in 300+ PHP versions simultaneously
<?php $global = 42; function outer() { global $global; $local = $global; function inner() { global $global, $local; var_dump($global, $local); } } outer(); inner();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2bFiK
function name:  (null)
number of ops:  6
compiled vars:  !0 = $global
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 42
   16     1        INIT_FCALL                                               'outer'
          2        DO_FCALL                                      0          
   17     3        INIT_FCALL_BY_NAME                                       'inner'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function outer:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2bFiK
function name:  outer
number of ops:  4
compiled vars:  !0 = $global, !1 = $local
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_GLOBAL                                              !0, 'global'
    8     1        ASSIGN                                                   !1, !0
   10     2        DECLARE_FUNCTION                                         'inner'
   14     3      > RETURN                                                   null

End of function outer

Function %00inner%2Fin%2F2bFiK%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2bFiK
function name:  inner
number of ops:  7
compiled vars:  !0 = $global, !1 = $local
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   BIND_GLOBAL                                              !0, 'global'
          1        BIND_GLOBAL                                              !1, 'local'
   12     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                                 
   13     6      > RETURN                                                   null

End of function %00inner%2Fin%2F2bFiK%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.39 ms | 1398 KiB | 16 Q