3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = microtime(true); $a = array(); $i = 0; for ($i = 0; $i < 1000; $i++) { $a[] = $i; } $e = microtime(true); echo round(($e - $s) * 1000, 1) . " ms"; echo round(($e - $s) * 1000, 1) . " ms";
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/kJ9IZ
function name:  (null)
number of ops:  34
compiled vars:  !0 = $s, !1 = $a, !2 = $i, !3 = $e
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
    5     4        ASSIGN                                                   !1, <array>
    7     5        ASSIGN                                                   !2, 0
    8     6        ASSIGN                                                   !2, 0
          7      > JMP                                                      ->11
   10     8    >   ASSIGN_DIM                                               !1
          9        OP_DATA                                                  !2
    8    10        PRE_INC                                                  !2
         11    >   IS_SMALLER                                               !2, 1000
         12      > JMPNZ                                                    ~11, ->8
   13    13    >   INIT_FCALL                                               'microtime'
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $12     
         16        ASSIGN                                                   !3, $12
   15    17        INIT_FCALL                                               'round'
         18        SUB                                              ~14     !3, !0
         19        MUL                                              ~15     ~14, 1000
         20        SEND_VAL                                                 ~15
         21        SEND_VAL                                                 1
         22        DO_ICALL                                         $16     
         23        CONCAT                                           ~17     $16, '+ms'
         24        ECHO                                                     ~17
   16    25        INIT_FCALL                                               'round'
         26        SUB                                              ~18     !3, !0
         27        MUL                                              ~19     ~18, 1000
         28        SEND_VAL                                                 ~19
         29        SEND_VAL                                                 1
         30        DO_ICALL                                         $20     
         31        CONCAT                                           ~21     $20, '+ms'
         32        ECHO                                                     ~21
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.94 ms | 1396 KiB | 17 Q