3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <body> <?php $x=5; $y=10; $z=$x/$y; function practiceTest() { global $x,$y,$z; $z=$x/$y; } practiceTest(); // run function echo $z; // 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/4BJK0
function name:  (null)
number of ops:  10
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, 5
    7     2        ASSIGN                                                   !1, 10
    8     3        DIV                                              ~5      !0, !1
          4        ASSIGN                                                   !2, ~5
   14     5        INIT_FCALL                                               'practicetest'
          6        DO_FCALL                                      0          
   15     7        ECHO                                                     !2
   17     8        ECHO                                                     '%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   19     9      > RETURN                                                   1

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

End of function practicetest

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.58 ms | 1389 KiB | 14 Q