3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = microtime(true); $i = 10000000; while ($i-- > 0) { if (false) {} elseif (true) {} } $time1 = microtime(true) - $time; unset($i); unset($time); $time = microtime(true); $i = 10000000; while ($i-- > 0) { if (false) {} else if (true) {} } $time2 = microtime(true) - $time; echo $time1." ".$time2;
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 = 12, Position 2 = 6
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
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 = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 28
Branch analysis from position: 28
Branch analysis from position: 28
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 9
Branch analysis from position: 9
Branch analysis from position: 9
filename:       /in/I6ftK
function name:  (null)
number of ops:  40
compiled vars:  !0 = $time, !1 = $i, !2 = $time1, !3 = $time2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    3     4        ASSIGN                                                   !1, 10000000
    4     5      > JMP                                                      ->9
    5     6    > > JMPZ                                                     <false>, ->8
          7    > > JMP                                                      ->9
    6     8    > > JMPZ                                                     <true>, ->9
    4     9    >   POST_DEC                                         ~7      !1
         10        IS_SMALLER                                               0, ~7
         11      > JMPNZ                                                    ~8, ->6
    8    12    >   INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $9      
         15        SUB                                              ~10     $9, !0
         16        ASSIGN                                                   !2, ~10
    9    17        UNSET_CV                                                 !1
         18        UNSET_CV                                                 !0
   11    19        INIT_FCALL                                               'microtime'
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $12     
         22        ASSIGN                                                   !0, $12
   12    23        ASSIGN                                                   !1, 10000000
   13    24      > JMP                                                      ->28
   14    25    > > JMPZ                                                     <false>, ->27
         26    > > JMP                                                      ->28
   15    27    > > JMPZ                                                     <true>, ->28
   13    28    >   POST_DEC                                         ~15     !1
         29        IS_SMALLER                                               0, ~15
         30      > JMPNZ                                                    ~16, ->25
   17    31    >   INIT_FCALL                                               'microtime'
         32        SEND_VAL                                                 <true>
         33        DO_ICALL                                         $17     
         34        SUB                                              ~18     $17, !0
         35        ASSIGN                                                   !3, ~18
   19    36        CONCAT                                           ~20     !2, '+'
         37        CONCAT                                           ~21     ~20, !3
         38        ECHO                                                     ~21
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.06 ms | 1392 KiB | 15 Q