3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace bar { $someVar = null; } namespace foo { function bar() { global $someVar; $someVar = 'Testing'; } } namespace { \foo\bar(); echo $someVar; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YUP3N
function name:  (null)
number of ops:  5
compiled vars:  !0 = $someVar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, null
   20     1        INIT_FCALL                                               'foo%5Cbar'
          2        DO_FCALL                                      0          
   22     3        ECHO                                                     !0
   23     4      > RETURN                                                   1

Function foo%5Cbar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YUP3N
function name:  foo\bar
number of ops:  3
compiled vars:  !0 = $someVar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   BIND_GLOBAL                                              !0, 'someVar'
   13     1        ASSIGN                                                   !0, 'Testing'
   14     2      > RETURN                                                   null

End of function foo%5Cbar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.53 ms | 1396 KiB | 14 Q