3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function rmshash($toHash) { $hashArray = array(); $toHashARR = str_split($toHash); $toHash = base64_encode($toHash); for ($i = 0; $i < count($toHashARR); $i++) { $value = unpack('H*', $toHashARR[$i]); $hashArray[$i] = base_convert($value[1], 16, 2); } $odds = 1; $evens = 1; for ($k = 0; $k < count($hashArray); $k++) { if ($k % 2 == 1) { $odds = $odds * (int)$hashArray[$k]; } else { $evens = $evens * (int)$hashArray[$k]; } } $hash; $hash = ($odds + $evens) * ($odds + $evens) * ($odds + $evens); $hash = (($hash / $odds) * $evens); $hash = $hash / (count($hashArray) * $evens); $hash = strtolower((string)$hash); $hash = strtok($hash, 'e'); $hash = base64_encode($hash); $hash = $hash . $toHash; $hash = base64_encode($hash); $hash64Array = array(); $hash64ARR = str_split($hash); for ($l = 0; $l < count($hash64ARR); $l++) { $value2 = unpack('H*', $hash64ARR[$l]); $hash64Array[$l] = base_convert($value2[1], 16, 2); } $hash = 1; for ($m = 0; $m < count($hash64Array); $m++) { $hash = $hash * (int)$hash64Array[$m]; } $hash = $hash * abs(tan(count($hash64Array))); $hash = base64_encode($hash); $hash = substr($hash, 0, 32); return $hash; } print rmshash("test"); ?>
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/PfV2v
function name:  (null)
number of ops:  6
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
  43     1        INIT_FCALL                                               'rmshash'
         2        SEND_VAL                                                 'test'
         3        DO_FCALL                                      0  $0      
         4        ECHO                                                     $0
         5      > RETURN                                                   1

Function rmshash:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 28
Branch analysis from position: 28
Jump found. Position 1 = 33, Position 2 = 12
Branch analysis from position: 33
Jump found. Position 1 = 51
Branch analysis from position: 51
Jump found. Position 1 = 56, Position 2 = 37
Branch analysis from position: 56
Jump found. Position 1 = 114
Branch analysis from position: 114
Jump found. Position 1 = 119, Position 2 = 98
Branch analysis from position: 119
Jump found. Position 1 = 128
Branch analysis from position: 128
Jump found. Position 1 = 133, Position 2 = 122
Branch analysis from position: 133
Jump found. Position 1 = -2
Branch analysis from position: 122
Jump found. Position 1 = 133, Position 2 = 122
Branch analysis from position: 133
Branch analysis from position: 122
Branch analysis from position: 98
Jump found. Position 1 = 119, Position 2 = 98
Branch analysis from position: 119
Branch analysis from position: 98
Branch analysis from position: 37
Jump found. Position 1 = 40, Position 2 = 45
Branch analysis from position: 40
Jump found. Position 1 = 49
Branch analysis from position: 49
Jump found. Position 1 = 56, Position 2 = 37
Branch analysis from position: 56
Branch analysis from position: 37
Branch analysis from position: 45
Jump found. Position 1 = 56, Position 2 = 37
Branch analysis from position: 56
Branch analysis from position: 37
Branch analysis from position: 12
Jump found. Position 1 = 33, Position 2 = 12
Branch analysis from position: 33
Branch analysis from position: 12
filename:       /in/PfV2v
function name:  rmshash
number of ops:  156
compiled vars:  !0 = $toHash, !1 = $hashArray, !2 = $toHashARR, !3 = $i, !4 = $value, !5 = $odds, !6 = $evens, !7 = $k, !8 = $hash, !9 = $hash64Array, !10 = $hash64ARR, !11 = $l, !12 = $value2, !13 = $m
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   RECV                                             !0      
   3     1        ASSIGN                                                   !1, <array>
   4     2        INIT_FCALL                                               'str_split'
         3        SEND_VAR                                                 !0
         4        DO_ICALL                                         $15     
         5        ASSIGN                                                   !2, $15
   5     6        INIT_FCALL                                               'base64_encode'
         7        SEND_VAR                                                 !0
         8        DO_ICALL                                         $17     
         9        ASSIGN                                                   !0, $17
   6    10        ASSIGN                                                   !3, 0
        11      > JMP                                                      ->28
   7    12    >   INIT_FCALL                                               'unpack'
        13        SEND_VAL                                                 'H%2A'
        14        FETCH_DIM_R                                      $20     !2, !3
        15        SEND_VAR                                                 $20
        16        DO_ICALL                                         $21     
        17        ASSIGN                                                   !4, $21
   8    18        INIT_FCALL                                               'base_convert'
        19        FETCH_DIM_R                                      $24     !4, 1
        20        SEND_VAR                                                 $24
        21        SEND_VAL                                                 16
        22        SEND_VAL                                                 2
        23        DO_ICALL                                         $25     
        24        ASSIGN_DIM                                               !1, !3
        25        OP_DATA                                                  $25
   6    26        POST_INC                                         ~26     !3
        27        FREE                                                     ~26
        28    >   INIT_FCALL                                               'count'
        29        SEND_VAR                                                 !2
        30        DO_ICALL                                         $27     
        31        IS_SMALLER                                       ~28     !3, $27
        32      > JMPNZ                                                    ~28, ->12
  10    33    >   ASSIGN                                                   !5, 1
  11    34        ASSIGN                                                   !6, 1
  12    35        ASSIGN                                                   !7, 0
        36      > JMP                                                      ->51
  13    37    >   MOD                                              ~32     !7, 2
        38        IS_EQUAL                                         ~33     ~32, 1
        39      > JMPZ                                                     ~33, ->45
  14    40    >   FETCH_DIM_R                                      $34     !1, !7
        41        CAST                                          4  ~35     $34
        42        MUL                                              ~36     !5, ~35
        43        ASSIGN                                                   !5, ~36
        44      > JMP                                                      ->49
  16    45    >   FETCH_DIM_R                                      $38     !1, !7
        46        CAST                                          4  ~39     $38
        47        MUL                                              ~40     !6, ~39
        48        ASSIGN                                                   !6, ~40
  12    49    >   POST_INC                                         ~42     !7
        50        FREE                                                     ~42
        51    >   INIT_FCALL                                               'count'
        52        SEND_VAR                                                 !1
        53        DO_ICALL                                         $43     
        54        IS_SMALLER                                       ~44     !7, $43
        55      > JMPNZ                                                    ~44, ->37
  20    56    >   ADD                                              ~45     !5, !6
        57        ADD                                              ~46     !5, !6
        58        MUL                                              ~47     ~45, ~46
        59        ADD                                              ~48     !5, !6
        60        MUL                                              ~49     ~47, ~48
        61        ASSIGN                                                   !8, ~49
  21    62        DIV                                              ~51     !8, !5
        63        MUL                                              ~52     ~51, !6
        64        ASSIGN                                                   !8, ~52
  22    65        INIT_FCALL                                               'count'
        66        SEND_VAR                                                 !1
        67        DO_ICALL                                         $54     
        68        MUL                                              ~55     $54, !6
        69        DIV                                              ~56     !8, ~55
        70        ASSIGN                                                   !8, ~56
  23    71        INIT_FCALL                                               'strtolower'
        72        CAST                                          6  ~58     !8
        73        SEND_VAL                                                 ~58
        74        DO_ICALL                                         $59     
        75        ASSIGN                                                   !8, $59
  24    76        INIT_FCALL                                               'strtok'
        77        SEND_VAR                                                 !8
        78        SEND_VAL                                                 'e'
        79        DO_ICALL                                         $61     
        80        ASSIGN                                                   !8, $61
  25    81        INIT_FCALL                                               'base64_encode'
        82        SEND_VAR                                                 !8
        83        DO_ICALL                                         $63     
        84        ASSIGN                                                   !8, $63
  26    85        CONCAT                                           ~65     !8, !0
        86        ASSIGN                                                   !8, ~65
  27    87        INIT_FCALL                                               'base64_encode'
        88        SEND_VAR                                                 !8
        89        DO_ICALL                                         $67     
        90        ASSIGN                                                   !8, $67
  28    91        ASSIGN                                                   !9, <array>
  29    92        INIT_FCALL                                               'str_split'
        93        SEND_VAR                                                 !8
        94        DO_ICALL                                         $70     
        95        ASSIGN                                                   !10, $70
  30    96        ASSIGN                                                   !11, 0
        97      > JMP                                                      ->114
  31    98    >   INIT_FCALL                                               'unpack'
        99        SEND_VAL                                                 'H%2A'
       100        FETCH_DIM_R                                      $73     !10, !11
       101        SEND_VAR                                                 $73
       102        DO_ICALL                                         $74     
       103        ASSIGN                                                   !12, $74
  32   104        INIT_FCALL                                               'base_convert'
       105        FETCH_DIM_R                                      $77     !12, 1
       106        SEND_VAR                                                 $77
       107        SEND_VAL                                                 16
       108        SEND_VAL                                                 2
       109        DO_ICALL                                         $78     
       110        ASSIGN_DIM                                               !9, !11
       111        OP_DATA                                                  $78
  30   112        POST_INC                                         ~79     !11
       113        FREE                                                     ~79
       114    >   INIT_FCALL                                               'count'
       115        SEND_VAR                                                 !10
       116        DO_ICALL                                         $80     
       117        IS_SMALLER                                       ~81     !11, $80
       118      > JMPNZ                                                    ~81, ->98
  34   119    >   ASSIGN                                                   !8, 1
  35   120        ASSIGN                                                   !13, 0
       121      > JMP                                                      ->128
  36   122    >   FETCH_DIM_R                                      $84     !9, !13
       123        CAST                                          4  ~85     $84
       124        MUL                                              ~86     !8, ~85
       125        ASSIGN                                                   !8, ~86
  35   126        POST_INC                                         ~88     !13
       127        FREE                                                     ~88
       128    >   INIT_FCALL                                               'count'
       129        SEND_VAR                                                 !9
       130        DO_ICALL                                         $89     
       131        IS_SMALLER                                       ~90     !13, $89
       132      > JMPNZ                                                    ~90, ->122
  38   133    >   INIT_FCALL                                               'abs'
       134        INIT_FCALL                                               'tan'
       135        INIT_FCALL                                               'count'
       136        SEND_VAR                                                 !9
       137        DO_ICALL                                         $91     
       138        SEND_VAR                                                 $91
       139        DO_ICALL                                         $92     
       140        SEND_VAR                                                 $92
       141        DO_ICALL                                         $93     
       142        MUL                                              ~94     !8, $93
       143        ASSIGN                                                   !8, ~94
  39   144        INIT_FCALL                                               'base64_encode'
       145        SEND_VAR                                                 !8
       146        DO_ICALL                                         $96     
       147        ASSIGN                                                   !8, $96
  40   148        INIT_FCALL                                               'substr'
       149        SEND_VAR                                                 !8
       150        SEND_VAL                                                 0
       151        SEND_VAL                                                 32
       152        DO_ICALL                                         $98     
       153        ASSIGN                                                   !8, $98
  41   154      > RETURN                                                   !8
  42   155*     > RETURN                                                   null

End of function rmshash

Generated using Vulcan Logic Dumper, using php 7.2.0