3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <body> <?php $x = 75; $y = 25; function addition() { $GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y']; } addition(); echo $z; ?> </body> </html>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j0UIe
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x, !1 = $y, !2 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%3Cbody%3E%0A%0A'
    6     1        ASSIGN                                                   !0, 75
    7     2        ASSIGN                                                   !1, 25
   13     3        INIT_FCALL                                               'addition'
          4        DO_FCALL                                      0          
   14     5        ECHO                                                     !2
   16     6        ECHO                                                     '%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   18     7      > RETURN                                                   1

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

End of function addition

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.76 ms | 1397 KiB | 14 Q