3v4l.org

run code in 300+ PHP versions simultaneously
<?php function &collector() { static $collection = array(); return $collection; } $collection = &collector(); $collection[] = 'foo'; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ba5Kf
function name:  (null)
number of ops:  6
compiled vars:  !0 = $collection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'collector'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN_REF                                               !0, $1
    7     3        ASSIGN_DIM                                               !0
          4        OP_DATA                                                  'foo'
    8     5      > RETURN                                                   1

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

End of function collector

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.32 ms | 1396 KiB | 14 Q