3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.3 ms | 1388 KiB | 17 Q