3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = range(1, 100000); var_dump(memory_get_peak_usage()); foreach (array_chunk($a, 10) as $element) { } var_dump(memory_get_peak_usage());
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/1LYhg
function name:  (null)
number of ops:  24
compiled vars:  !0 = $a, !1 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 100000
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'memory_get_peak_usage'
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
    5    10        INIT_FCALL                                               'array_chunk'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 10
         13        DO_ICALL                                         $6      
         14      > FE_RESET_R                                       $7      $6, ->17
         15    > > FE_FETCH_R                                               $7, !1, ->17
         16    > > JMP                                                      ->15
         17    >   FE_FREE                                                  $7
    8    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'memory_get_peak_usage'
         20        DO_ICALL                                         $8      
         21        SEND_VAR                                                 $8
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.38 ms | 1013 KiB | 17 Q