3v4l.org

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

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.84 ms | 1401 KiB | 14 Q