3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function testAlgos() { $algos = hash_algos(); $word="This will be crypted by all different algoritms"; $results = array(); foreach($algos as $algo) { $time=microtime(1); $data = hash($algo, $word, false); $results["".(microtime(1)-$time)][] = "$algo (hex)"; } foreach($algos as $algo) { $time=microtime(1); $data = hash($algo, $word, true); $results["".(microtime(1)-$time)][] = "$algo (raw)"; } ksort($results); foreach($results as $time => &$algos) { echo $time."\n"; sort($algos); foreach($algos as $algo) echo "\t".$algo."\n"; } } testAlgos();
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Aq6RO
function name:  (null)
number of ops:  4
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
  26     1        INIT_FCALL                                               'testalgos'
         2        DO_FCALL                                      0          
         3      > RETURN                                                   1

Function testalgos:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 6, Position 2 = 28
Branch analysis from position: 6
Jump found. Position 1 = 7, Position 2 = 28
Branch analysis from position: 7
Jump found. Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 28
Jump found. Position 1 = 30, Position 2 = 52
Branch analysis from position: 30
Jump found. Position 1 = 31, Position 2 = 52
Branch analysis from position: 31
Jump found. Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 52
Jump found. Position 1 = 57, Position 2 = 72
Branch analysis from position: 57
Jump found. Position 1 = 58, Position 2 = 72
Branch analysis from position: 58
Jump found. Position 1 = 65, Position 2 = 70
Branch analysis from position: 65
Jump found. Position 1 = 66, Position 2 = 70
Branch analysis from position: 66
Jump found. Position 1 = 65
Branch analysis from position: 65
Branch analysis from position: 70
Jump found. Position 1 = 57
Branch analysis from position: 57
Branch analysis from position: 70
Branch analysis from position: 72
Jump found. Position 1 = -2
Branch analysis from position: 72
Branch analysis from position: 52
Branch analysis from position: 28
filename:       /in/Aq6RO
function name:  testAlgos
number of ops:  74
compiled vars:  !0 = $algos, !1 = $word, !2 = $results, !3 = $algo, !4 = $time, !5 = $data
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   INIT_FCALL                                               'hash_algos'
         1        DO_ICALL                                         $6      
         2        ASSIGN                                                   !0, $6
   4     3        ASSIGN                                                   !1, 'This+will+be+crypted+by+all+different+algoritms'
   5     4        ASSIGN                                                   !2, <array>
   6     5      > FE_RESET_R                                       $10     !0, ->28
         6    > > FE_FETCH_R                                               $10, !3, ->28
   8     7    >   INIT_FCALL                                               'microtime'
         8        SEND_VAL                                                 1
         9        DO_ICALL                                         $11     
        10        ASSIGN                                                   !4, $11
   9    11        INIT_FCALL                                               'hash'
        12        SEND_VAR                                                 !3
        13        SEND_VAR                                                 !1
        14        SEND_VAL                                                 <false>
        15        DO_ICALL                                         $13     
        16        ASSIGN                                                   !5, $13
  10    17        INIT_FCALL                                               'microtime'
        18        SEND_VAL                                                 1
        19        DO_ICALL                                         $15     
        20        SUB                                              ~16     $15, !4
        21        CONCAT                                           ~17     '', ~16
        22        NOP                                                      
        23        FAST_CONCAT                                      ~20     !3, '+%28hex%29'
        24        FETCH_DIM_W                                      $18     !2, ~17
        25        ASSIGN_DIM                                               $18
        26        OP_DATA                                                  ~20
        27      > JMP                                                      ->6
        28    >   FE_FREE                                                  $10
  12    29      > FE_RESET_R                                       $21     !0, ->52
        30    > > FE_FETCH_R                                               $21, !3, ->52
  14    31    >   INIT_FCALL                                               'microtime'
        32        SEND_VAL                                                 1
        33        DO_ICALL                                         $22     
        34        ASSIGN                                                   !4, $22
  15    35        INIT_FCALL                                               'hash'
        36        SEND_VAR                                                 !3
        37        SEND_VAR                                                 !1
        38        SEND_VAL                                                 <true>
        39        DO_ICALL                                         $24     
        40        ASSIGN                                                   !5, $24
  16    41        INIT_FCALL                                               'microtime'
        42        SEND_VAL                                                 1
        43        DO_ICALL                                         $26     
        44        SUB                                              ~27     $26, !4
        45        CONCAT                                           ~28     '', ~27
        46        NOP                                                      
        47        FAST_CONCAT                                      ~31     !3, '+%28raw%29'
        48        FETCH_DIM_W                                      $29     !2, ~28
        49        ASSIGN_DIM                                               $29
        50        OP_DATA                                                  ~31
        51      > JMP                                                      ->30
        52    >   FE_FREE                                                  $21
  18    53        INIT_FCALL                                               'ksort'
        54        SEND_REF                                                 !2
        55        DO_ICALL                                                 
  19    56      > FE_RESET_RW                                      $33     !2, ->72
        57    > > FE_FETCH_RW                                              $33, !0, ->72
        58    >   ASSIGN                                                   !4, ~34
  20    59        CONCAT                                           ~36     !4, '%0A'
        60        ECHO                                                     ~36
  21    61        INIT_FCALL                                               'sort'
        62        SEND_REF                                                 !0
        63        DO_ICALL                                                 
  22    64      > FE_RESET_R                                       $38     !0, ->70
        65    > > FE_FETCH_R                                               $38, !3, ->70
  23    66    >   CONCAT                                           ~39     '%09', !3
        67        CONCAT                                           ~40     ~39, '%0A'
        68        ECHO                                                     ~40
        69      > JMP                                                      ->65
        70    >   FE_FREE                                                  $38
        71      > JMP                                                      ->57
        72    >   FE_FREE                                                  $33
  25    73      > RETURN                                                   null

End of function testalgos

Generated using Vulcan Logic Dumper, using php 7.2.0