3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo memory_get_peak_usage()/(1024*1024) . 'MB', "\n"; $pass = str_repeat('a', 1024 * 1024 * 2); 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/nr3f5
function name:  (null)
number of ops:  17
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'
    4     6        INIT_FCALL                                               'str_repeat'
          7        SEND_VAL                                                 'a'
          8        SEND_VAL                                                 2097152
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !0, $4
    6    11        INIT_FCALL                                               'memory_get_peak_usage'
         12        DO_ICALL                                         $6      
         13        DIV                                              ~7      $6, 1048576
         14        CONCAT                                           ~8      ~7, 'MB'
         15        ECHO                                                     ~8
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.05 ms | 1394 KiB | 17 Q