3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = []; foreach(hash_algos() as $algo) { $start = microtime(true); $i = 1e5; while (--$i) { hash($algo, $i); } $result[$algo] = microtime(true) - $start; } asort($result); var_dump($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 24
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 24
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 11
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 11
Branch analysis from position: 17
Branch analysis from position: 11
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/l8pWL
function name:  (null)
number of ops:  32
compiled vars:  !0 = $result, !1 = $algo, !2 = $start, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'hash_algos'
          2        DO_ICALL                                         $5      
          3      > FE_RESET_R                                       $6      $5, ->24
          4    > > FE_FETCH_R                                               $6, !1, ->24
    6     5    >   INIT_FCALL                                               'microtime'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !2, $7
    7     9        ASSIGN                                                   !3, 100000
    8    10      > JMP                                                      ->15
    9    11    >   INIT_FCALL                                               'hash'
         12        SEND_VAR                                                 !1
         13        SEND_VAR                                                 !3
         14        DO_ICALL                                                 
    8    15    >   PRE_DEC                                          ~11     !3
         16      > JMPNZ                                                    ~11, ->11
   11    17    >   INIT_FCALL                                               'microtime'
         18        SEND_VAL                                                 <true>
         19        DO_ICALL                                         $13     
         20        SUB                                              ~14     $13, !2
         21        ASSIGN_DIM                                               !0, !1
         22        OP_DATA                                                  ~14
    4    23      > JMP                                                      ->4
         24    >   FE_FREE                                                  $6
   14    25        INIT_FCALL                                               'asort'
         26        SEND_REF                                                 !0
         27        DO_ICALL                                                 
   15    28        INIT_FCALL                                               'var_dump'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.96 ms | 1396 KiB | 23 Q