3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.79 ms | 1400 KiB | 25 Q