3v4l.org

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

Function collector:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XcfAs
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                                                   !0
    6     2*     > RETURN                                                   null

End of function collector

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.93 ms | 1394 KiB | 15 Q