3v4l.org

run code in 300+ PHP versions simultaneously
<?php function doNothing() {} $start = microtime(); for ($i=0;$i<1000;$i++) { doNothing(); } $end = microtime(); $start = explode(' ', $start); $start = $start[0] + ($start[1] - 1378586325); $end = explode(' ', $end); $end = $end[0] + ($end[1] - 1378586325); echo sprintf('%F', $end) . ' - ' . sprintf('%F', $start) . ' = ' . sprintf('%F', $end - $start) . PHP_EOL; $start = microtime(true); for ($i=0;$i<1000;$i++) { doNothing(); } $end = microtime(true); echo sprintf('%F', $end) . ' - ' . sprintf('%F', $start) . ' = ' . sprintf('%F', $end - $start) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 61
Branch analysis from position: 61
2 jumps found. (Code = 44) Position 1 = 63, Position 2 = 58
Branch analysis from position: 63
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 58
2 jumps found. (Code = 44) Position 1 = 63, Position 2 = 58
Branch analysis from position: 63
Branch analysis from position: 58
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/g1822
function name:  (null)
number of ops:  87
compiled vars:  !0 = $start, !1 = $i, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'microtime'
          1        DO_ICALL                                         $3      
          2        ASSIGN                                                   !0, $3
    6     3        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->8
          5    >   INIT_FCALL                                               'donothing'
          6        DO_FCALL                                      0          
          7        PRE_INC                                                  !1
          8    >   IS_SMALLER                                               !1, 1000
          9      > JMPNZ                                                    ~8, ->5
    7    10    >   INIT_FCALL                                               'microtime'
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !2, $9
    9    13        INIT_FCALL                                               'explode'
         14        SEND_VAL                                                 '+'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !0, $11
   10    18        FETCH_DIM_R                                      ~13     !0, 0
         19        FETCH_DIM_R                                      ~14     !0, 1
         20        SUB                                              ~15     ~14, 1378586325
         21        ADD                                              ~16     ~13, ~15
         22        ASSIGN                                                   !0, ~16
   11    23        INIT_FCALL                                               'explode'
         24        SEND_VAL                                                 '+'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                         $18     
         27        ASSIGN                                                   !2, $18
   12    28        FETCH_DIM_R                                      ~20     !2, 0
         29        FETCH_DIM_R                                      ~21     !2, 1
         30        SUB                                              ~22     ~21, 1378586325
         31        ADD                                              ~23     ~20, ~22
         32        ASSIGN                                                   !2, ~23
   13    33        INIT_FCALL                                               'sprintf'
         34        SEND_VAL                                                 '%25F'
         35        SEND_VAR                                                 !2
         36        DO_ICALL                                         $25     
         37        CONCAT                                           ~26     $25, '+-+'
         38        INIT_FCALL                                               'sprintf'
         39        SEND_VAL                                                 '%25F'
         40        SEND_VAR                                                 !0
         41        DO_ICALL                                         $27     
         42        CONCAT                                           ~28     ~26, $27
         43        CONCAT                                           ~29     ~28, '+%3D+'
         44        INIT_FCALL                                               'sprintf'
         45        SEND_VAL                                                 '%25F'
         46        SUB                                              ~30     !2, !0
         47        SEND_VAL                                                 ~30
         48        DO_ICALL                                         $31     
         49        CONCAT                                           ~32     ~29, $31
         50        CONCAT                                           ~33     ~32, '%0A'
         51        ECHO                                                     ~33
   16    52        INIT_FCALL                                               'microtime'
         53        SEND_VAL                                                 <true>
         54        DO_ICALL                                         $34     
         55        ASSIGN                                                   !0, $34
   17    56        ASSIGN                                                   !1, 0
         57      > JMP                                                      ->61
         58    >   INIT_FCALL                                               'donothing'
         59        DO_FCALL                                      0          
         60        PRE_INC                                                  !1
         61    >   IS_SMALLER                                               !1, 1000
         62      > JMPNZ                                                    ~39, ->58
   18    63    >   INIT_FCALL                                               'microtime'
         64        SEND_VAL                                                 <true>
         65        DO_ICALL                                         $40     
         66        ASSIGN                                                   !2, $40
   19    67        INIT_FCALL                                               'sprintf'
         68        SEND_VAL                                                 '%25F'
         69        SEND_VAR                                                 !2
         70        DO_ICALL                                         $42     
         71        CONCAT                                           ~43     $42, '+-+'
         72        INIT_FCALL                                               'sprintf'
         73        SEND_VAL                                                 '%25F'
         74        SEND_VAR                                                 !0
         75        DO_ICALL                                         $44     
         76        CONCAT                                           ~45     ~43, $44
         77        CONCAT                                           ~46     ~45, '+%3D+'
         78        INIT_FCALL                                               'sprintf'
         79        SEND_VAL                                                 '%25F'
         80        SUB                                              ~47     !2, !0
         81        SEND_VAL                                                 ~47
         82        DO_ICALL                                         $48     
         83        CONCAT                                           ~49     ~46, $48
         84        CONCAT                                           ~50     ~49, '%0A'
         85        ECHO                                                     ~50
         86      > RETURN                                                   1

Function donothing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g1822
function name:  doNothing
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > RETURN                                                   null

End of function donothing

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.72 ms | 1407 KiB | 21 Q