3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = 5; function sub() { global $x; --$x; } sub(); var_dump($x); sub(); var_dump($x); sub(); var_dump($x); sub(); var_dump($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oVqsd
function name:  (null)
number of ops:  22
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 5
   11     1        INIT_FCALL                                               'sub'
          2        DO_FCALL                                      0          
          3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   12     6        INIT_FCALL                                               'sub'
          7        DO_FCALL                                      0          
          8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
   13    11        INIT_FCALL                                               'sub'
         12        DO_FCALL                                      0          
         13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
   14    16        INIT_FCALL                                               'sub'
         17        DO_FCALL                                      0          
         18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

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

End of function sub

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.16 ms | 1398 KiB | 19 Q