3v4l.org

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

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

End of function mytest

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.91 ms | 1396 KiB | 14 Q