3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mem_start = memory_get_usage(true); echo 'start: ' . $mem_start . PHP_EOL; $max_iterations = 10000; for ($i = 1; $i <= $max_iterations; $i++) { //DateTime::createFromFormat('M/D/Y H:i:s', '2013-11-12 20:00:00'); new stdClass; if (($i % 1000) == 0) { echo $i . '.: ' . memory_get_usage(true) . PHP_EOL; } } $mem_end = memory_get_usage(true); echo 'end: ' . $mem_end . PHP_EOL; echo 'diff end-start: ' . ($mem_end - $mem_start) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 10
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 23
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 10
Branch analysis from position: 26
Branch analysis from position: 10
Branch analysis from position: 23
filename:       /in/jeJ3t
function name:  (null)
number of ops:  38
compiled vars:  !0 = $mem_start, !1 = $max_iterations, !2 = $i, !3 = $mem_end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'memory_get_usage'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    3     4        CONCAT                                           ~6      'start%3A+', !0
          5        CONCAT                                           ~7      ~6, '%0A'
          6        ECHO                                                     ~7
    5     7        ASSIGN                                                   !1, 10000
    6     8        ASSIGN                                                   !2, 1
          9      > JMP                                                      ->24
    8    10    >   NEW                                              $10     'stdClass'
         11        DO_FCALL                                      0          
         12        FREE                                                     $10
    9    13        MOD                                              ~12     !2, 1000
         14        IS_EQUAL                                                 ~12, 0
         15      > JMPZ                                                     ~13, ->23
   10    16    >   CONCAT                                           ~14     !2, '.%3A+'
         17        INIT_FCALL                                               'memory_get_usage'
         18        SEND_VAL                                                 <true>
         19        DO_ICALL                                         $15     
         20        CONCAT                                           ~16     ~14, $15
         21        CONCAT                                           ~17     ~16, '%0A'
         22        ECHO                                                     ~17
    6    23    >   PRE_INC                                                  !2
         24    >   IS_SMALLER_OR_EQUAL                                      !2, !1
         25      > JMPNZ                                                    ~19, ->10
   13    26    >   INIT_FCALL                                               'memory_get_usage'
         27        SEND_VAL                                                 <true>
         28        DO_ICALL                                         $20     
         29        ASSIGN                                                   !3, $20
   14    30        CONCAT                                           ~22     'end%3A+', !3
         31        CONCAT                                           ~23     ~22, '%0A'
         32        ECHO                                                     ~23
   15    33        SUB                                              ~24     !3, !0
         34        CONCAT                                           ~25     'diff+end-start%3A+', ~24
         35        CONCAT                                           ~26     ~25, '%0A'
         36        ECHO                                                     ~26
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.28 ms | 1400 KiB | 15 Q