3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v1 = 1; $v2 = 2; $v3 = 3; function myFunction() { $GLOBALS['v1'] *= 2; $v2 *= 2; global $v3; $v3 *= 2; } myFunction(); echo "$v1$v2$v3";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5av9M
function name:  (null)
number of ops:  10
compiled vars:  !0 = $v1, !1 = $v2, !2 = $v3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
    3     1        ASSIGN                                                   !1, 2
    4     2        ASSIGN                                                   !2, 3
   11     3        INIT_FCALL                                               'myfunction'
          4        DO_FCALL                                      0          
   12     5        ROPE_INIT                                     3  ~8      !0
          6        ROPE_ADD                                      1  ~8      ~8, !1
          7        ROPE_END                                      2  ~7      ~8, !2
          8        ECHO                                                     ~7
          9      > RETURN                                                   1

Function myfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5av9M
function name:  myFunction
number of ops:  7
compiled vars:  !0 = $v2, !1 = $v3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_RW                     global              $2      'GLOBALS'
          1        ASSIGN_DIM_OP                *=               3          $2, 'v1'
          2        OP_DATA                                                  2
    7     3        ASSIGN_OP                                     3          !0, 2
    8     4        BIND_GLOBAL                                              !1, 'v3'
          5        ASSIGN_OP                                     3          !1, 2
    9     6      > RETURN                                                   null

End of function myfunction

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.98 ms | 1397 KiB | 14 Q