3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.05 ms | 1395 KiB | 17 Q