3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = microtime(true); $memo = memory_get_usage(true); // BEGIN $x = str_repeat('0', 1024*1024); $y = $x; // END $memo = memory_get_usage(true) - $memo; $time = microtime(true) - $time; echo sprintf("%dms - %.2fmo", $time*1000, $memo/1024/1024);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IE43t
function name:  (null)
number of ops:  34
compiled vars:  !0 = $time, !1 = $memo, !2 = $x, !3 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    4     4        INIT_FCALL                                               'memory_get_usage'
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
    7     8        INIT_FCALL                                               'str_repeat'
          9        SEND_VAL                                                 '0'
         10        SEND_VAL                                                 1048576
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !2, $8
    8    13        ASSIGN                                                   !3, !2
   11    14        INIT_FCALL                                               'memory_get_usage'
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $11     
         17        SUB                                              ~12     $11, !1
         18        ASSIGN                                                   !1, ~12
   12    19        INIT_FCALL                                               'microtime'
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $14     
         22        SUB                                              ~15     $14, !0
         23        ASSIGN                                                   !0, ~15
   14    24        INIT_FCALL                                               'sprintf'
         25        SEND_VAL                                                 '%25dms+-+%25.2fmo'
         26        MUL                                              ~17     !0, 1000
         27        SEND_VAL                                                 ~17
         28        DIV                                              ~18     !1, 1024
         29        DIV                                              ~19     ~18, 1024
         30        SEND_VAL                                                 ~19
         31        DO_ICALL                                         $20     
         32        ECHO                                                     $20
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.61 ms | 1396 KiB | 21 Q