3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = 10000000; $i = 0; $start = microtime(true); while($i < $c) { $v = -2.0 * 0.01; // echo $v; $i++; } $end = microtime(true); $multiplyTime = $end - $start; echo "$multiplyTime \n"; $i = 0; $start = microtime(true); while($i < $c) { $v = -2.0 / 100; // echo $v; $i++; } $end = microtime(true); $divisionTime = $end - $start; echo "$divisionTime \n"; echo $multiplyTime/$divisionTime;
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 = 7
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 26
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 26
Branch analysis from position: 30
Branch analysis from position: 26
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 7
Branch analysis from position: 11
Branch analysis from position: 7
filename:       /in/q3Hec
function name:  (null)
number of ops:  42
compiled vars:  !0 = $c, !1 = $i, !2 = $start, !3 = $v, !4 = $end, !5 = $multiplyTime, !6 = $divisionTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 10000000
    5     1        ASSIGN                                                   !1, 0
    6     2        INIT_FCALL                                               'microtime'
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $9      
          5        ASSIGN                                                   !2, $9
    7     6      > JMP                                                      ->9
    8     7    >   ASSIGN                                                   !3, -0.02
   10     8        PRE_INC                                                  !1
    7     9    >   IS_SMALLER                                               !1, !0
         10      > JMPNZ                                                    ~13, ->7
   12    11    >   INIT_FCALL                                               'microtime'
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $14     
         14        ASSIGN                                                   !4, $14
   13    15        SUB                                              ~16     !4, !2
         16        ASSIGN                                                   !5, ~16
   14    17        NOP                                                      
         18        FAST_CONCAT                                      ~18     !5, '+%0A'
         19        ECHO                                                     ~18
   16    20        ASSIGN                                                   !1, 0
   17    21        INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $20     
         24        ASSIGN                                                   !2, $20
   18    25      > JMP                                                      ->28
   19    26    >   ASSIGN                                                   !3, -0.02
   21    27        PRE_INC                                                  !1
   18    28    >   IS_SMALLER                                               !1, !0
         29      > JMPNZ                                                    ~24, ->26
   23    30    >   INIT_FCALL                                               'microtime'
         31        SEND_VAL                                                 <true>
         32        DO_ICALL                                         $25     
         33        ASSIGN                                                   !4, $25
   25    34        SUB                                              ~27     !4, !2
         35        ASSIGN                                                   !6, ~27
   26    36        NOP                                                      
         37        FAST_CONCAT                                      ~29     !6, '+%0A'
         38        ECHO                                                     ~29
   28    39        DIV                                              ~30     !5, !6
         40        ECHO                                                     ~30
   29    41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.15 ms | 1400 KiB | 15 Q