3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.03 ms | 1395 KiB | 17 Q