3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pass = str_repeat('a', 1024 * 512); echo strlen($pass . $pass), "\n"; echo smemory_get_peak_usage(), "\n", 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/2M0Cj
function name:  (null)
number of ops:  19
compiled vars:  !0 = $pass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'str_repeat'
          1        SEND_VAL                                                 'a'
          2        SEND_VAL                                                 524288
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    4     5        CONCAT                                           ~3      !0, !0
          6        STRLEN                                           ~4      ~3
          7        ECHO                                                     ~4
          8        ECHO                                                     '%0A'
    6     9        INIT_FCALL_BY_NAME                                       'smemory_get_peak_usage'
         10        DO_FCALL                                      0  $5      
         11        ECHO                                                     $5
         12        ECHO                                                     '%0A'
         13        INIT_FCALL                                               'memory_get_peak_usage'
         14        DO_ICALL                                         $6      
         15        DIV                                              ~7      $6, 1048576
         16        CONCAT                                           ~8      ~7, 'MB'
         17        ECHO                                                     ~8
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.44 ms | 1394 KiB | 17 Q