3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x=5; $y=10; function add() { global $x,$y; $z=$x+$y; echo $z; } echo '$x value is'.$x; echo '$y value is'.$y;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bfSJit
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, 5
    3     1        ASSIGN                                                   !1, 10
   10     2        CONCAT                                           ~4      '%24x+value+is', !0
          3        ECHO                                                     ~4
   11     4        CONCAT                                           ~5      '%24y+value+is', !1
          5        ECHO                                                     ~5
          6      > RETURN                                                   1

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

End of function add

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.43 ms | 1393 KiB | 13 Q