3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Initial: ".memory_get_usage()." bytes \n"; /* prints Initial: 361400 bytes */ // let's use up some memory for ($i = 0; $i < 100000; $i++) { $array []= md5($i); } // let's remove half of the array for ($i = 0; $i < 100000; $i++) { unset($array[$i]); } echo "Final: ".memory_get_usage()." bytes \n"; /* prints Final: 885912 bytes */ echo "Peak: ".memory_get_peak_usage()." bytes \n"; /* prints Peak: 13687072 bytes */ ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 7
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 17
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 17
Branch analysis from position: 21
Branch analysis from position: 17
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 7
Branch analysis from position: 15
Branch analysis from position: 7
filename:       /in/bXNik
function name:  (null)
number of ops:  32
compiled vars:  !0 = $i, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'memory_get_usage'
          1        DO_ICALL                                         $2      
          2        CONCAT                                           ~3      'Initial%3A+', $2
          3        CONCAT                                           ~4      ~3, '+bytes+%0A'
          4        ECHO                                                     ~4
    8     5        ASSIGN                                                   !0, 0
          6      > JMP                                                      ->13
    9     7    >   INIT_FCALL                                               'md5'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $7      
         10        ASSIGN_DIM                                               !1
         11        OP_DATA                                                  $7
    8    12        PRE_INC                                                  !0
         13    >   IS_SMALLER                                               !0, 100000
         14      > JMPNZ                                                    ~9, ->7
   13    15    >   ASSIGN                                                   !0, 0
         16      > JMP                                                      ->19
   14    17    >   UNSET_DIM                                                !1, !0
   13    18        PRE_INC                                                  !0
         19    >   IS_SMALLER                                               !0, 100000
         20      > JMPNZ                                                    ~12, ->17
   17    21    >   INIT_FCALL                                               'memory_get_usage'
         22        DO_ICALL                                         $13     
         23        CONCAT                                           ~14     'Final%3A+', $13
         24        CONCAT                                           ~15     ~14, '+bytes+%0A'
         25        ECHO                                                     ~15
   22    26        INIT_FCALL                                               'memory_get_peak_usage'
         27        DO_ICALL                                         $16     
         28        CONCAT                                           ~17     'Peak%3A+', $16
         29        CONCAT                                           ~18     ~17, '+bytes+%0A'
         30        ECHO                                                     ~18
   26    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.74 ms | 1396 KiB | 19 Q