3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 'foo'; var_dump(memory_get_usage()); foreach (range(1,100) as $i) { $$i = $foo; } var_dump(memory_get_usage()); foreach (range(1,100) as $y) { $$y &= $foo; } var_dump(memory_get_usage());
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 15
2 jumps found. (Code = 77) Position 1 = 26, Position 2 = 30
Branch analysis from position: 26
2 jumps found. (Code = 78) Position 1 = 27, Position 2 = 30
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
Branch analysis from position: 15
filename:       /in/JqgM4
function name:  (null)
number of ops:  37
compiled vars:  !0 = $foo, !1 = $i, !2 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'foo'
    3     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'memory_get_usage'
          3        DO_ICALL                                         $4      
          4        SEND_VAR                                                 $4
          5        DO_ICALL                                                 
    4     6        INIT_FCALL                                               'range'
          7        SEND_VAL                                                 1
          8        SEND_VAL                                                 100
          9        DO_ICALL                                         $6      
         10      > FE_RESET_R                                       $7      $6, ->15
         11    > > FE_FETCH_R                                               $7, !1, ->15
    5    12    >   FETCH_W                      local               $8      !1
         13        ASSIGN                                                   $8, !0
    4    14      > JMP                                                      ->11
         15    >   FE_FREE                                                  $7
    7    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'memory_get_usage'
         18        DO_ICALL                                         $10     
         19        SEND_VAR                                                 $10
         20        DO_ICALL                                                 
    8    21        INIT_FCALL                                               'range'
         22        SEND_VAL                                                 1
         23        SEND_VAL                                                 100
         24        DO_ICALL                                         $12     
         25      > FE_RESET_R                                       $13     $12, ->30
         26    > > FE_FETCH_R                                               $13, !2, ->30
    9    27    >   FETCH_RW                     local               $14     !2
         28        ASSIGN_OP                                    10          $14, !0
    8    29      > JMP                                                      ->26
         30    >   FE_FREE                                                  $13
   11    31        INIT_FCALL                                               'var_dump'
         32        INIT_FCALL                                               'memory_get_usage'
         33        DO_ICALL                                         $16     
         34        SEND_VAR                                                 $16
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.45 ms | 1400 KiB | 19 Q