3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.57 ms | 1395 KiB | 15 Q