3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f() { global $x; echo "f() before: $x\n"; $x = $x + 10; echo "f() after: $x\n"; return 1; } $x = 0; echo "file before: $x\n"; $y = $x; $x = $y + f(); echo "file after: $x\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QWDfl
function name:  (null)
number of ops:  15
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 0
   10     1        ROPE_INIT                                     3  ~4      'file+before%3A+'
          2        ROPE_ADD                                      1  ~4      ~4, !0
          3        ROPE_END                                      2  ~3      ~4, '%0A'
          4        ECHO                                                     ~3
   11     5        ASSIGN                                                   !1, !0
   12     6        INIT_FCALL                                               'f'
          7        DO_FCALL                                      0  $7      
          8        ADD                                              ~8      !1, $7
          9        ASSIGN                                                   !0, ~8
   13    10        ROPE_INIT                                     3  ~11     'file+after%3A+'
         11        ROPE_ADD                                      1  ~11     ~11, !0
         12        ROPE_END                                      2  ~10     ~11, '%0A'
         13        ECHO                                                     ~10
         14      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QWDfl
function name:  f
number of ops:  13
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   BIND_GLOBAL                                              !0, 'x'
    4     1        ROPE_INIT                                     3  ~2      'f%28%29+before%3A+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%0A'
          4        ECHO                                                     ~1
    5     5        ADD                                              ~4      !0, 10
          6        ASSIGN                                                   !0, ~4
    6     7        ROPE_INIT                                     3  ~7      'f%28%29+after%3A+'
          8        ROPE_ADD                                      1  ~7      ~7, !0
          9        ROPE_END                                      2  ~6      ~7, '%0A'
         10        ECHO                                                     ~6
    7    11      > RETURN                                                   1
    8    12*     > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.44 ms | 1399 KiB | 14 Q