3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array(); for($i = 0; $i < 8000; $i++) { $data[] = "あ"; } echo "point1:".memory_get_usage()."\n"; foreach ($data as $d) {} echo "point2:".memory_get_usage()."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/fDfBZ
function name:  (null)
number of ops:  23
compiled vars:  !0 = $data, !1 = $i, !2 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
    4     3    >   ASSIGN_DIM                                               !0
          4        OP_DATA                                                  '%E3%81%82'
    3     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, 8000
          7      > JMPNZ                                                    ~7, ->3
    6     8    >   INIT_FCALL                                               'memory_get_usage'
          9        DO_ICALL                                         $8      
         10        CONCAT                                           ~9      'point1%3A', $8
         11        CONCAT                                           ~10     ~9, '%0A'
         12        ECHO                                                     ~10
    7    13      > FE_RESET_R                                       $11     !0, ->16
         14    > > FE_FETCH_R                                               $11, !2, ->16
         15    > > JMP                                                      ->14
         16    >   FE_FREE                                                  $11
    8    17        INIT_FCALL                                               'memory_get_usage'
         18        DO_ICALL                                         $12     
         19        CONCAT                                           ~13     'point2%3A', $12
         20        CONCAT                                           ~14     ~13, '%0A'
         21        ECHO                                                     ~14
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.28 ms | 1395 KiB | 15 Q