3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mem_start = memory_get_usage(true); echo 'start: ' . $mem_start . PHP_EOL; $max_iterations = 1000; for ($i = 1; $i <= $max_iterations; $i++) { DateTime::createFromFormat('M/D/Y H:i:s', '2013-11-12 20:00:00'); if (($i % 100) == 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 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 10
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 24
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 10
Branch analysis from position: 27
Branch analysis from position: 10
Branch analysis from position: 24
filename:       /in/BUW3T
function name:  (null)
number of ops:  39
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, 1000
    6     8        ASSIGN                                                   !2, 1
          9      > JMP                                                      ->25
    7    10    >   INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
         11        SEND_VAL                                                 'M%2FD%2FY+H%3Ai%3As'
         12        SEND_VAL                                                 '2013-11-12+20%3A00%3A00'
         13        DO_FCALL                                      0          
    8    14        MOD                                              ~11     !2, 100
         15        IS_EQUAL                                                 ~11, 0
         16      > JMPZ                                                     ~12, ->24
    9    17    >   CONCAT                                           ~13     !2, '.%3A+'
         18        INIT_FCALL                                               'memory_get_usage'
         19        SEND_VAL                                                 <true>
         20        DO_ICALL                                         $14     
         21        CONCAT                                           ~15     ~13, $14
         22        CONCAT                                           ~16     ~15, '%0A'
         23        ECHO                                                     ~16
    6    24    >   PRE_INC                                                  !2
         25    >   IS_SMALLER_OR_EQUAL                                      !2, !1
         26      > JMPNZ                                                    ~18, ->10
   12    27    >   INIT_FCALL                                               'memory_get_usage'
         28        SEND_VAL                                                 <true>
         29        DO_ICALL                                         $19     
         30        ASSIGN                                                   !3, $19
   13    31        CONCAT                                           ~21     'end%3A+', !3
         32        CONCAT                                           ~22     ~21, '%0A'
         33        ECHO                                                     ~22
   14    34        SUB                                              ~23     !3, !0
         35        CONCAT                                           ~24     'diff+end-start%3A+', ~23
         36        CONCAT                                           ~25     ~24, '%0A'
         37        ECHO                                                     ~25
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.48 ms | 1400 KiB | 15 Q