3v4l.org

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

Function collector:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TLCY7
function name:  collector
number of ops:  8
compiled vars:  !0 = $collection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   BIND_STATIC                                              !0
    4     1      > RETURN                                                   !0
    5     2*       INIT_FCALL                                               'implode'
          3*       SEND_VAL                                                 ''
          4*       SEND_VAR                                                 !0
          5*       DO_ICALL                                         $1      
          6*       ECHO                                                     $1
    6     7*     > RETURN                                                   null

End of function collector

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.27 ms | 1394 KiB | 15 Q