3v4l.org

run code in 300+ PHP versions simultaneously
<?php function &func() { static $static = 0; $static++; return $static; } $var1 = func(); echo "var1:", $var1; // 1 $var1 = 10; $var1 = func(); echo "\nvar1:", $var1; // 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p6erT
function name:  (null)
number of ops:  12
compiled vars:  !0 = $var1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'func'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   10     3        ECHO                                                     'var1%3A'
          4        ECHO                                                     !0
   11     5        ASSIGN                                                   !0, 10
   12     6        INIT_FCALL                                               'func'
          7        DO_FCALL                                      0  $4      
          8        ASSIGN                                                   !0, $4
   13     9        ECHO                                                     '%0Avar1%3A'
         10        ECHO                                                     !0
         11      > RETURN                                                   1

Function func:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/p6erT
function name:  func
number of ops:  4
compiled vars:  !0 = $static
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   BIND_STATIC                                              !0
    6     1        PRE_INC                                                  !0
    7     2      > RETURN_BY_REF                                            !0
    8     3*     > RETURN_BY_REF                                            null

End of function func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.61 ms | 998 KiB | 15 Q