3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = []; for( $i =0 ; $i < 50000 ; $i++) { $data[] = md5('test'); } echo memory_get_usage()."\n"; echo memory_get_usage(true)."\n"; unset($data); echo memory_get_usage()."\n"; echo memory_get_usage(true);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
Branch analysis from position: 3
filename:       /in/gRL9G
function name:  (null)
number of ops:  30
compiled vars:  !0 = $data, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->9
    4     3    >   INIT_FCALL                                               'md5'
          4        SEND_VAL                                                 'test'
          5        DO_ICALL                                         $5      
          6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  $5
    3     8        PRE_INC                                                  !1
          9    >   IS_SMALLER                                               !1, 50000
         10      > JMPNZ                                                    ~7, ->3
    7    11    >   INIT_FCALL                                               'memory_get_usage'
         12        DO_ICALL                                         $8      
         13        CONCAT                                           ~9      $8, '%0A'
         14        ECHO                                                     ~9
    8    15        INIT_FCALL                                               'memory_get_usage'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $10     
         18        CONCAT                                           ~11     $10, '%0A'
         19        ECHO                                                     ~11
   10    20        UNSET_CV                                                 !0
   12    21        INIT_FCALL                                               'memory_get_usage'
         22        DO_ICALL                                         $12     
         23        CONCAT                                           ~13     $12, '%0A'
         24        ECHO                                                     ~13
   13    25        INIT_FCALL                                               'memory_get_usage'
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $14     
         28        ECHO                                                     $14
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.42 ms | 1396 KiB | 17 Q