3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; $b = 2; function Sum() { global $a, $b; $b = $a + $b; } Sum(); echo $b;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dGpDl
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    4     1        ASSIGN                                                   !1, 2
   13     2        INIT_FCALL                                               'sum'
          3        DO_FCALL                                      0          
   14     4        ECHO                                                     !1
          5      > RETURN                                                   1

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

End of function sum

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.84 ms | 1396 KiB | 14 Q