3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = []; $startMemory = memory_get_usage(); foreach (range(1, 100000) as $i) { $array[] = "adfsdfghsfghfsgh $i"; } echo memory_get_usage() - $startMemory, " bytes\n"; $startMemory = memory_get_usage(); foreach (range(1, 100000) as $i) { $array["test$i"] = "sdfghsfghsfg $i"; } echo memory_get_usage() - $startMemory, " bytes\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 15
2 jumps found. (Code = 77) Position 1 = 29, Position 2 = 37
Branch analysis from position: 29
2 jumps found. (Code = 78) Position 1 = 30, Position 2 = 37
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
Branch analysis from position: 15
filename:       /in/RZDVf
function name:  (null)
number of ops:  44
compiled vars:  !0 = $array, !1 = $startMemory, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'memory_get_usage'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !1, $4
    6     4        INIT_FCALL                                               'range'
          5        SEND_VAL                                                 1
          6        SEND_VAL                                                 100000
          7        DO_ICALL                                         $6      
          8      > FE_RESET_R                                       $7      $6, ->15
          9    > > FE_FETCH_R                                               $7, !2, ->15
    7    10    >   NOP                                                      
         11        FAST_CONCAT                                      ~9      'adfsdfghsfghfsgh+', !2
         12        ASSIGN_DIM                                               !0
         13        OP_DATA                                                  ~9
    6    14      > JMP                                                      ->9
         15    >   FE_FREE                                                  $7
    9    16        INIT_FCALL                                               'memory_get_usage'
         17        DO_ICALL                                         $10     
         18        SUB                                              ~11     $10, !1
         19        ECHO                                                     ~11
         20        ECHO                                                     '+bytes%0A'
   11    21        INIT_FCALL                                               'memory_get_usage'
         22        DO_ICALL                                         $12     
         23        ASSIGN                                                   !1, $12
   12    24        INIT_FCALL                                               'range'
         25        SEND_VAL                                                 1
         26        SEND_VAL                                                 100000
         27        DO_ICALL                                         $14     
         28      > FE_RESET_R                                       $15     $14, ->37
         29    > > FE_FETCH_R                                               $15, !2, ->37
   13    30    >   NOP                                                      
         31        FAST_CONCAT                                      ~16     'test', !2
         32        NOP                                                      
         33        FAST_CONCAT                                      ~18     'sdfghsfghsfg+', !2
         34        ASSIGN_DIM                                               !0, ~16
         35        OP_DATA                                                  ~18
   12    36      > JMP                                                      ->29
         37    >   FE_FREE                                                  $15
   15    38        INIT_FCALL                                               'memory_get_usage'
         39        DO_ICALL                                         $19     
         40        SUB                                              ~20     $19, !1
         41        ECHO                                                     ~20
         42        ECHO                                                     '+bytes%0A'
         43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.78 ms | 1400 KiB | 17 Q