3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.6 ms | 1396 KiB | 19 Q