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); $start = microtime(true); for ($i=0;$i<1000;$i++) { doNothing(); } $end = microtime(true); echo sprintf('%F', $end) . ' - ' . sprintf('%F', $start) . ' = ' . sprintf('%F', $end - $start);
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 = 60
Branch analysis from position: 60
2 jumps found. (Code = 44) Position 1 = 62, Position 2 = 57
Branch analysis from position: 62
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 57
2 jumps found. (Code = 44) Position 1 = 62, Position 2 = 57
Branch analysis from position: 62
Branch analysis from position: 57
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/DQeKb
function name:  (null)
number of ops:  85
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        ECHO                                                     ~32
   16    51        INIT_FCALL                                               'microtime'
         52        SEND_VAL                                                 <true>
         53        DO_ICALL                                         $33     
         54        ASSIGN                                                   !0, $33
   17    55        ASSIGN                                                   !1, 0
         56      > JMP                                                      ->60
         57    >   INIT_FCALL                                               'donothing'
         58        DO_FCALL                                      0          
         59        PRE_INC                                                  !1
         60    >   IS_SMALLER                                               !1, 1000
         61      > JMPNZ                                                    ~38, ->57
   18    62    >   INIT_FCALL                                               'microtime'
         63        SEND_VAL                                                 <true>
         64        DO_ICALL                                         $39     
         65        ASSIGN                                                   !2, $39
   19    66        INIT_FCALL                                               'sprintf'
         67        SEND_VAL                                                 '%25F'
         68        SEND_VAR                                                 !2
         69        DO_ICALL                                         $41     
         70        CONCAT                                           ~42     $41, '+-+'
         71        INIT_FCALL                                               'sprintf'
         72        SEND_VAL                                                 '%25F'
         73        SEND_VAR                                                 !0
         74        DO_ICALL                                         $43     
         75        CONCAT                                           ~44     ~42, $43
         76        CONCAT                                           ~45     ~44, '+%3D+'
         77        INIT_FCALL                                               'sprintf'
         78        SEND_VAL                                                 '%25F'
         79        SUB                                              ~46     !2, !0
         80        SEND_VAL                                                 ~46
         81        DO_ICALL                                         $47     
         82        CONCAT                                           ~48     ~45, $47
         83        ECHO                                                     ~48
         84      > RETURN                                                   1

Function donothing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DQeKb
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:
154.97 ms | 1407 KiB | 21 Q