3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_sum() { global $var; $var = 5; } $var = 10; get_sum(); echo $var; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uugTC
function name:  (null)
number of ops:  5
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 10
    8     1        INIT_FCALL                                               'get_sum'
          2        DO_FCALL                                      0          
    9     3        ECHO                                                     !0
   10     4      > RETURN                                                   1

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

End of function get_sum

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.59 ms | 1400 KiB | 15 Q