3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startMath = microtime(); for ($i = 0; $i < 10000; $i++) $var = 24*3600*365; $endMath = microtime(); $timeMath = $endMath - $startMath; echo 'Math took : ',$timeMath,'ms'; $startNoMath = microtime(); for ($i = 0; $i < 10000; $i++) $var = 31536000; $endNoMath = microtime(); $timeNoMath = $endNoMath - $startNoMath; echo 'No math took : ',$timeNoMath,'ms';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 5
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 22
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 22
Branch analysis from position: 26
Branch analysis from position: 22
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 5
Branch analysis from position: 9
Branch analysis from position: 5
filename:       /in/Jrahe
function name:  (null)
number of ops:  35
compiled vars:  !0 = $startMath, !1 = $i, !2 = $var, !3 = $endMath, !4 = $timeMath, !5 = $startNoMath, !6 = $endNoMath, !7 = $timeNoMath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'microtime'
          1        DO_ICALL                                         $8      
          2        ASSIGN                                                   !0, $8
    3     3        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->7
    4     5    >   ASSIGN                                                   !2, 31536000
    3     6        PRE_INC                                                  !1
          7    >   IS_SMALLER                                               !1, 10000
          8      > JMPNZ                                                    ~13, ->5
    5     9    >   INIT_FCALL                                               'microtime'
         10        DO_ICALL                                         $14     
         11        ASSIGN                                                   !3, $14
    6    12        SUB                                              ~16     !3, !0
         13        ASSIGN                                                   !4, ~16
    7    14        ECHO                                                     'Math+took+%3A+'
         15        ECHO                                                     !4
         16        ECHO                                                     'ms'
    9    17        INIT_FCALL                                               'microtime'
         18        DO_ICALL                                         $18     
         19        ASSIGN                                                   !5, $18
   10    20        ASSIGN                                                   !1, 0
         21      > JMP                                                      ->24
   11    22    >   ASSIGN                                                   !2, 31536000
   10    23        PRE_INC                                                  !1
         24    >   IS_SMALLER                                               !1, 10000
         25      > JMPNZ                                                    ~23, ->22
   12    26    >   INIT_FCALL                                               'microtime'
         27        DO_ICALL                                         $24     
         28        ASSIGN                                                   !6, $24
   13    29        SUB                                              ~26     !6, !5
         30        ASSIGN                                                   !7, ~26
   14    31        ECHO                                                     'No+math+took+%3A+'
         32        ECHO                                                     !7
         33        ECHO                                                     'ms'
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.11 ms | 1388 KiB | 15 Q