3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pass = str_repeat('a', 1024 * 512); echo strlen($pass . $pass); 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/AtIq8
function name:  (null)
number of ops:  18
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
    6     8        INIT_FCALL_BY_NAME                                       'smemory_get_peak_usage'
          9        DO_FCALL                                      0  $5      
         10        ECHO                                                     $5
         11        ECHO                                                     '%0A'
         12        INIT_FCALL                                               'memory_get_peak_usage'
         13        DO_ICALL                                         $6      
         14        DIV                                              ~7      $6, 1048576
         15        CONCAT                                           ~8      ~7, 'MB'
         16        ECHO                                                     ~8
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.9 ms | 1394 KiB | 17 Q