3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.14 ms | 1005 KiB | 16 Q