3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x=5;/* this multiline comment */ $y=10; //this is global echo $y; echo '<br>'; function add(){ $globals['a']=$globals['x']+$globals['y']; echo $a; } add(); echo $a;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TJhRO
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x, !1 = $y, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 5
    3     1        ASSIGN                                                   !1, 10
    4     2        ECHO                                                     !1
    5     3        ECHO                                                     '%3Cbr%3E'
   10     4        INIT_FCALL                                               'add'
          5        DO_FCALL                                      0          
   11     6        ECHO                                                     !2
          7      > RETURN                                                   1

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

End of function add

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.26 ms | 1397 KiB | 14 Q