3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startMemory = memory_get_usage(); $array = range(1, 100000); echo memory_get_usage() - $startMemory, ' bytes'; echo memory_get_peak_usage() . "\n"; $var['test'] = 'hallo2'; var_dump($var); echo memory_get_peak_usage() . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GTXiW
function name:  (null)
number of ops:  27
compiled vars:  !0 = $startMemory, !1 = $array, !2 = $var
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'
    8    13        INIT_FCALL                                               'memory_get_peak_usage'
         14        DO_ICALL                                         $9      
         15        CONCAT                                           ~10     $9, '%0A'
         16        ECHO                                                     ~10
   10    17        ASSIGN_DIM                                               !2, 'test'
         18        OP_DATA                                                  'hallo2'
   11    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
   13    22        INIT_FCALL                                               'memory_get_peak_usage'
         23        DO_ICALL                                         $13     
         24        CONCAT                                           ~14     $13, '%0A'
         25        ECHO                                                     ~14
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.07 ms | 1395 KiB | 21 Q