3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 20000; $time = microtime(true); $items = array(); for ($i = 0; $i < $count; $i++) { $items[] = array(); } $spentTime = microtime(true) - $time; echo number_format($spentTime, 3) . ' seconds';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 8
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 8
Branch analysis from position: 13
Branch analysis from position: 8
filename:       /in/JN5Qk
function name:  (null)
number of ops:  25
compiled vars:  !0 = $count, !1 = $time, !2 = $items, !3 = $i, !4 = $spentTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 20000
    5     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
    6     5        ASSIGN                                                   !2, <array>
    8     6        ASSIGN                                                   !3, 0
          7      > JMP                                                      ->11
    9     8    >   ASSIGN_DIM                                               !2
          9        OP_DATA                                                  <array>
    8    10        PRE_INC                                                  !3
         11    >   IS_SMALLER                                               !3, !0
         12      > JMPNZ                                                    ~12, ->8
   12    13    >   INIT_FCALL                                               'microtime'
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $13     
         16        SUB                                              ~14     $13, !1
         17        ASSIGN                                                   !4, ~14
   14    18        INIT_FCALL                                               'number_format'
         19        SEND_VAR                                                 !4
         20        SEND_VAL                                                 3
         21        DO_ICALL                                         $16     
         22        CONCAT                                           ~17     $16, '+seconds'
         23        ECHO                                                     ~17
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.82 ms | 1387 KiB | 17 Q