3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.83 ms | 1387 KiB | 17 Q