3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo memory_get_peak_usage(), PHP_EOL; $a = range(1, 10000); $a[10000] = 0; echo memory_get_peak_usage(), PHP_EOL; // 380824 // 874320 // 381368 // 1464752
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kIubs
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'memory_get_peak_usage'
          1        DO_ICALL                                         $1      
          2        ECHO                                                     $1
          3        ECHO                                                     '%0A'
    4     4        INIT_FCALL                                               'range'
          5        SEND_VAL                                                 1
          6        SEND_VAL                                                 10000
          7        DO_ICALL                                         $2      
          8        ASSIGN                                                   !0, $2
    5     9        ASSIGN_DIM                                               !0, 10000
         10        OP_DATA                                                  0
    6    11        INIT_FCALL                                               'memory_get_peak_usage'
         12        DO_ICALL                                         $5      
         13        ECHO                                                     $5
         14        ECHO                                                     '%0A'
   12    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.22 ms | 1386 KiB | 17 Q