3v4l.org

run code in 500+ PHP versions simultaneously
<?php function init() { $a = 'a'; $b = 'b'; function test() { global $a,$b; var_dump($a, $b); } echo test(); } init();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IsvLd
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                                   'init'
          1        DO_FCALL                                          0          
          2      > RETURN                                                       1

Function init:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IsvLd
function name:  init
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                       !0, 'a'
    7     1        ASSIGN                                                       !1, 'b'
    9     2        DECLARE_FUNCTION                                             'test'
   15     3        INIT_FCALL_BY_NAME                                           'test'
          4        DO_FCALL                                          0  $4      
          5        ECHO                                                         $4
   17     6      > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IsvLd
function name:  test
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   BIND_GLOBAL                                                  !0, 'a'
          1        BIND_GLOBAL                                                  !1, 'b'
   12     2        INIT_FCALL                                                   'var_dump'
          3        SEND_VAR                                                     !0
          4        SEND_VAR                                                     !1
          5        DO_ICALL                                                     
   13     6      > RETURN                                                       null

End of Dynamic Function 0

End of function init

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
154.11 ms | 3318 KiB | 15 Q