3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "++i "; $start = microtime(true); for ($i = 0; $i < 10000000; ++$i); $delta_pre = microtime(true) - $start; printf('%.4F', $delta_pre); echo PHP_EOL; echo "i++ "; $start = microtime(true); for ($i = 0; $i < 10000000; $i++); $delpa_post = microtime(true) - $start; printf('%.4F', $delpa_post); echo PHP_EOL; echo PHP_EOL; printf('%.2F', $delta_pre / $delpa_post * 100); echo "%", 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 = 7
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 27
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 27
Branch analysis from position: 30
Branch analysis from position: 27
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 7
Branch analysis from position: 10
Branch analysis from position: 7
filename:       /in/8RHgB
function name:  (null)
number of ops:  50
compiled vars:  !0 = $start, !1 = $i, !2 = $delta_pre, !3 = $delpa_post
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     '%2B%2Bi++'
    3     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !0, $4
    4     5        ASSIGN                                                   !1, 0
          6      > JMP                                                      ->8
          7    >   PRE_INC                                                  !1
          8    >   IS_SMALLER                                               !1, 10000000
          9      > JMPNZ                                                    ~8, ->7
    5    10    >   INIT_FCALL                                               'microtime'
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $9      
         13        SUB                                              ~10     $9, !0
         14        ASSIGN                                                   !2, ~10
    6    15        INIT_FCALL                                               'printf'
         16        SEND_VAL                                                 '%25.4F'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
    7    19        ECHO                                                     '%0A'
    9    20        ECHO                                                     'i%2B%2B++'
   10    21        INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $13     
         24        ASSIGN                                                   !0, $13
   11    25        ASSIGN                                                   !1, 0
         26      > JMP                                                      ->28
         27    >   PRE_INC                                                  !1
         28    >   IS_SMALLER                                               !1, 10000000
         29      > JMPNZ                                                    ~17, ->27
   12    30    >   INIT_FCALL                                               'microtime'
         31        SEND_VAL                                                 <true>
         32        DO_ICALL                                         $18     
         33        SUB                                              ~19     $18, !0
         34        ASSIGN                                                   !3, ~19
   13    35        INIT_FCALL                                               'printf'
         36        SEND_VAL                                                 '%25.4F'
         37        SEND_VAR                                                 !3
         38        DO_ICALL                                                 
   14    39        ECHO                                                     '%0A'
   16    40        ECHO                                                     '%0A'
   17    41        INIT_FCALL                                               'printf'
         42        SEND_VAL                                                 '%25.2F'
         43        DIV                                              ~22     !2, !3
         44        MUL                                              ~23     ~22, 100
         45        SEND_VAL                                                 ~23
         46        DO_ICALL                                                 
   18    47        ECHO                                                     '%25'
         48        ECHO                                                     '%0A'
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.64 ms | 1400 KiB | 17 Q