3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = microtime(true); for ($i = 0; $i < 10000; $i++) { $time = $_SERVER['REQUEST_TIME']; } echo 'request time: ' . (microtime(true) - $time) . "\n"; $time = microtime(true); for ($i = 0; $i < 10000; $i++) { $time = time(); } echo 'time(): ' . (microtime(true) - $time);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 25
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 25
Branch analysis from position: 31
Branch analysis from position: 25
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
Branch analysis from position: 6
filename:       /in/7BjUQ
function name:  (null)
number of ops:  38
compiled vars:  !0 = $time, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    4     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->10
    5     6    >   FETCH_R                      global              ~5      '_SERVER'
          7        FETCH_DIM_R                                      ~6      ~5, 'REQUEST_TIME'
          8        ASSIGN                                                   !0, ~6
    4     9        PRE_INC                                                  !1
         10    >   IS_SMALLER                                               !1, 10000
         11      > JMPNZ                                                    ~9, ->6
    7    12    >   INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $10     
         15        SUB                                              ~11     $10, !0
         16        CONCAT                                           ~12     'request+time%3A+', ~11
         17        CONCAT                                           ~13     ~12, '%0A'
         18        ECHO                                                     ~13
    9    19        INIT_FCALL                                               'microtime'
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $14     
         22        ASSIGN                                                   !0, $14
   10    23        ASSIGN                                                   !1, 0
         24      > JMP                                                      ->29
   11    25    >   INIT_FCALL                                               'time'
         26        DO_ICALL                                         $17     
         27        ASSIGN                                                   !0, $17
   10    28        PRE_INC                                                  !1
         29    >   IS_SMALLER                                               !1, 10000
         30      > JMPNZ                                                    ~20, ->25
   14    31    >   INIT_FCALL                                               'microtime'
         32        SEND_VAL                                                 <true>
         33        DO_ICALL                                         $21     
         34        SUB                                              ~22     $21, !0
         35        CONCAT                                           ~23     'time%28%29%3A+', ~22
         36        ECHO                                                     ~23
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.39 ms | 1392 KiB | 17 Q