3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 0; $x = []; $start = microtime( true ); do { $x[] = array( "firstname" => "Patrick", "lastname" => "Allaert" ); ++$i; } while ( $i < 500000 ); echo microtime( true ) - $start, "\n", memory_get_peak_usage(), "\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/mXqhZ
function name:  (null)
number of ops:  22
compiled vars:  !0 = $i, !1 = $x, !2 = $start
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL                                               'microtime'
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !2, $5
    6     6    >   ASSIGN_DIM                                               !1
          7        OP_DATA                                                  <array>
    7     8        PRE_INC                                                  !0
    8     9        IS_SMALLER                                               !0, 500000
         10      > JMPNZ                                                    ~9, ->6
    9    11    >   INIT_FCALL                                               'microtime'
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $10     
         14        SUB                                              ~11     $10, !2
         15        ECHO                                                     ~11
         16        ECHO                                                     '%0A'
         17        INIT_FCALL                                               'memory_get_peak_usage'
         18        DO_ICALL                                         $12     
         19        ECHO                                                     $12
         20        ECHO                                                     '%0A'
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.83 ms | 1395 KiB | 17 Q