3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startMemory = memory_get_usage(); $array = new SplFixedArray(100000); for ($i = 0; $i < 100000; ++$i) { $array[$i] = $i; } echo memory_get_usage() - $startMemory, ' bytes';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 9
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 9
Branch analysis from position: 14
Branch analysis from position: 9
filename:       /in/YXcki
function name:  (null)
number of ops:  20
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        NEW                                              $5      'SplFixedArray'
          4        SEND_VAL_EX                                              100000
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
    5     7        ASSIGN                                                   !2, 0
          8      > JMP                                                      ->12
    6     9    >   ASSIGN_DIM                                               !1, !2
         10        OP_DATA                                                  !2
    5    11        PRE_INC                                                  !2
         12    >   IS_SMALLER                                               !2, 100000
         13      > JMPNZ                                                    ~11, ->9
    8    14    >   INIT_FCALL                                               'memory_get_usage'
         15        DO_ICALL                                         $12     
         16        SUB                                              ~13     $12, !0
         17        ECHO                                                     ~13
         18        ECHO                                                     '+bytes'
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
196.74 ms | 1395 KiB | 15 Q