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(){ $z=11; echo "local scope z: $z"; global $x,$y; $a=$x+$y; echo $a; } add(); echo "variable z is: $z"; echo $a;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OEXSo
function name:  (null)
number of ops:  11
compiled vars:  !0 = $x, !1 = $y, !2 = $z, !3 = $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'
   13     4        INIT_FCALL                                               'add'
          5        DO_FCALL                                      0          
   14     6        NOP                                                      
          7        FAST_CONCAT                                      ~7      'variable+z+is%3A+', !2
          8        ECHO                                                     ~7
   15     9        ECHO                                                     !3
         10      > RETURN                                                   1

Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OEXSo
function name:  add
number of ops:  10
compiled vars:  !0 = $z, !1 = $x, !2 = $y, !3 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 11
    8     1        NOP                                                      
          2        FAST_CONCAT                                      ~5      'local+scope+z%3A+', !0
          3        ECHO                                                     ~5
    9     4        BIND_GLOBAL                                              !1, 'x'
          5        BIND_GLOBAL                                              !2, 'y'
   10     6        ADD                                              ~6      !1, !2
          7        ASSIGN                                                   !3, ~6
   11     8        ECHO                                                     !3
   12     9      > RETURN                                                   null

End of function add

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.26 ms | 1389 KiB | 14 Q