3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = 75; $y = 25; function addition() { $GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y']; echo $x; } addition(); echo $z; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8XEhT
function name:  (null)
number of ops:  6
compiled vars:  !0 = $x, !1 = $y, !2 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 75
    3     1        ASSIGN                                                   !1, 25
   10     2        INIT_FCALL                                               'addition'
          3        DO_FCALL                                      0          
   11     4        ECHO                                                     !2
   12     5      > RETURN                                                   1

Function addition:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8XEhT
function name:  addition
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_R                      global              ~3      'GLOBALS'
          1        FETCH_DIM_R                                      ~4      ~3, 'x'
          2        FETCH_R                      global              ~5      'GLOBALS'
          3        FETCH_DIM_R                                      ~6      ~5, 'y'
          4        ADD                                              ~7      ~4, ~6
          5        FETCH_W                      global              $1      'GLOBALS'
          6        ASSIGN_DIM                                               $1, 'z'
          7        OP_DATA                                                  ~7
    7     8        ECHO                                                     !0
    8     9      > RETURN                                                   null

End of function addition

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.03 ms | 1397 KiB | 14 Q