3v4l.org

run code in 500+ PHP versions simultaneously
<?php $memStart = memory_get_usage(); $s = str_repeat("\x00", 1000 * 1000); $memEnd = memory_get_usage(); echo $memEnd - $memStart, PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iIXYj
function name:  (null)
number of ops:  15
compiled vars:  !0 = $memStart, !1 = $s, !2 = $memEnd
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'memory_get_usage'
          1        DO_ICALL                                             $3      
          2        ASSIGN                                                       !0, $3
    4     3        INIT_FCALL                                                   'str_repeat'
          4        SEND_VAL                                                     '%00'
          5        SEND_VAL                                                     1000000
          6        DO_ICALL                                             $5      
          7        ASSIGN                                                       !1, $5
    5     8        INIT_FCALL                                                   'memory_get_usage'
          9        DO_ICALL                                             $7      
         10        ASSIGN                                                       !2, $7
    6    11        SUB                                                  ~9      !2, !0
         12        ECHO                                                         ~9
         13        ECHO                                                         '%0A'
    7    14      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.49 ms | 1218 KiB | 15 Q