3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo memory_get_peak_usage()/(1024*1024) . 'MB', "\n"; echo memory_peak_usage()/(1024*1024) . 'MB', "\n"; $pass = str_repeat('a', 1024 * 1024 * 2); $pass . $pass; echo memory_get_peak_usage()/(1024*1024) . 'MB';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VcNuQ
function name:  (null)
number of ops:  25
compiled vars:  !0 = $pass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'memory_get_peak_usage'
          1        DO_ICALL                                         $1      
          2        DIV                                              ~2      $1, 1048576
          3        CONCAT                                           ~3      ~2, 'MB'
          4        ECHO                                                     ~3
          5        ECHO                                                     '%0A'
    3     6        INIT_FCALL_BY_NAME                                       'memory_peak_usage'
          7        DO_FCALL                                      0  $4      
          8        DIV                                              ~5      $4, 1048576
          9        CONCAT                                           ~6      ~5, 'MB'
         10        ECHO                                                     ~6
         11        ECHO                                                     '%0A'
    4    12        INIT_FCALL                                               'str_repeat'
         13        SEND_VAL                                                 'a'
         14        SEND_VAL                                                 2097152
         15        DO_ICALL                                         $7      
         16        ASSIGN                                                   !0, $7
    5    17        CONCAT                                           ~9      !0, !0
         18        FREE                                                     ~9
    7    19        INIT_FCALL                                               'memory_get_peak_usage'
         20        DO_ICALL                                         $10     
         21        DIV                                              ~11     $10, 1048576
         22        CONCAT                                           ~12     ~11, 'MB'
         23        ECHO                                                     ~12
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.24 ms | 1395 KiB | 17 Q