3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <body> <?php $x=5; $y=10; function practiceTest() { global $x,$y; $y=$x+$y; } praceticeTest(); // run function echo $y; // output the new value for variable $y ?> </body> </html>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TN4JD
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x, !1 = $y
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, 5
    7     2        ASSIGN                                                   !1, 10
   14     3        INIT_FCALL_BY_NAME                                       'praceticeTest'
          4        DO_FCALL                                      0          
   15     5        ECHO                                                     !1
   17     6        ECHO                                                     '%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   19     7      > RETURN                                                   1

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

End of function practicetest

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.24 ms | 1393 KiB | 13 Q