3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = microtime(true); $h = 0; for($i = 0; $i < 10000; $i++) { $h++; } $b = microtime(true); var_dump($b - $a); $a = microtime(true); $h = 0; foreach (range(1, 10000) as $index) { $h++; } $b = microtime(true); var_dump($b - $a);
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
2 jumps found. (Code = 77) Position 1 = 29, Position 2 = 32
Branch analysis from position: 29
2 jumps found. (Code = 78) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
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/missW
function name:  (null)
number of ops:  42
compiled vars:  !0 = $a, !1 = $h, !2 = $i, !3 = $b, !4 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $5      
          3        ASSIGN                                                   !0, $5
    5     4        ASSIGN                                                   !1, 0
    7     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->9
    9     7    >   PRE_INC                                                  !1
    7     8        PRE_INC                                                  !2
          9    >   IS_SMALLER                                               !2, 10000
         10      > JMPNZ                                                    ~11, ->7
   12    11    >   INIT_FCALL                                               'microtime'
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !3, $12
   14    15        INIT_FCALL                                               'var_dump'
         16        SUB                                              ~14     !3, !0
         17        SEND_VAL                                                 ~14
         18        DO_ICALL                                                 
   16    19        INIT_FCALL                                               'microtime'
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $16     
         22        ASSIGN                                                   !0, $16
   18    23        ASSIGN                                                   !1, 0
   20    24        INIT_FCALL                                               'range'
         25        SEND_VAL                                                 1
         26        SEND_VAL                                                 10000
         27        DO_ICALL                                         $19     
         28      > FE_RESET_R                                       $20     $19, ->32
         29    > > FE_FETCH_R                                               $20, !4, ->32
   22    30    >   PRE_INC                                                  !1
   20    31      > JMP                                                      ->29
         32    >   FE_FREE                                                  $20
   25    33        INIT_FCALL                                               'microtime'
         34        SEND_VAL                                                 <true>
         35        DO_ICALL                                         $22     
         36        ASSIGN                                                   !3, $22
   27    37        INIT_FCALL                                               'var_dump'
         38        SUB                                              ~24     !3, !0
         39        SEND_VAL                                                 ~24
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.8 ms | 1400 KiB | 19 Q