3v4l.org

run code in 300+ PHP versions simultaneously
<?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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PfV2v
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   43     0  E >   INIT_FCALL                                               'rmshash'
          1        SEND_VAL                                                 'test'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   44     4      > RETURN                                                   1

Function rmshash:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 12
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 34
Branch analysis from position: 50
1 jumps found. (Code = 42) Position 1 = 105
Branch analysis from position: 105
2 jumps found. (Code = 44) Position 1 = 108, Position 2 = 90
Branch analysis from position: 108
1 jumps found. (Code = 42) Position 1 = 116
Branch analysis from position: 116
2 jumps found. (Code = 44) Position 1 = 119, Position 2 = 111
Branch analysis from position: 119
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 111
2 jumps found. (Code = 44) Position 1 = 119, Position 2 = 111
Branch analysis from position: 119
Branch analysis from position: 111
Branch analysis from position: 90
2 jumps found. (Code = 44) Position 1 = 108, Position 2 = 90
Branch analysis from position: 108
Branch analysis from position: 90
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 42
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 34
Branch analysis from position: 50
Branch analysis from position: 34
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 34
Branch analysis from position: 50
Branch analysis from position: 34
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 12
Branch analysis from position: 30
Branch analysis from position: 12
filename:       /in/PfV2v
function name:  rmshash
number of ops:  140
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                                                      ->27
    7    12    >   INIT_FCALL                                               'unpack'
         13        SEND_VAL                                                 'H%2A'
         14        FETCH_DIM_R                                      ~20     !2, !3
         15        SEND_VAL                                                 ~20
         16        DO_ICALL                                         $21     
         17        ASSIGN                                                   !4, $21
    8    18        INIT_FCALL                                               'base_convert'
         19        FETCH_DIM_R                                      ~24     !4, 1
         20        SEND_VAL                                                 ~24
         21        SEND_VAL                                                 16
         22        SEND_VAL                                                 2
         23        DO_ICALL                                         $25     
         24        ASSIGN_DIM                                               !1, !3
         25        OP_DATA                                                  $25
    6    26        PRE_INC                                                  !3
         27    >   COUNT                                            ~27     !2
         28        IS_SMALLER                                               !3, ~27
         29      > JMPNZ                                                    ~28, ->12
   10    30    >   ASSIGN                                                   !5, 1
   11    31        ASSIGN                                                   !6, 1
   12    32        ASSIGN                                                   !7, 0
         33      > JMP                                                      ->47
   13    34    >   MOD                                              ~32     !7, 2
         35        IS_EQUAL                                                 ~32, 1
         36      > JMPZ                                                     ~33, ->42
   14    37    >   FETCH_DIM_R                                      ~34     !1, !7
         38        CAST                                          4  ~35     ~34
         39        MUL                                              ~36     !5, ~35
         40        ASSIGN                                                   !5, ~36
         41      > JMP                                                      ->46
   16    42    >   FETCH_DIM_R                                      ~38     !1, !7
         43        CAST                                          4  ~39     ~38
         44        MUL                                              ~40     !6, ~39
         45        ASSIGN                                                   !6, ~40
   12    46    >   PRE_INC                                                  !7
         47    >   COUNT                                            ~43     !1
         48        IS_SMALLER                                               !7, ~43
         49      > JMPNZ                                                    ~44, ->34
   20    50    >   ADD                                              ~45     !5, !6
         51        ADD                                              ~46     !5, !6
         52        MUL                                              ~47     ~45, ~46
         53        ADD                                              ~48     !5, !6
         54        MUL                                              ~49     ~47, ~48
         55        ASSIGN                                                   !8, ~49
   21    56        DIV                                              ~51     !8, !5
         57        MUL                                              ~52     !6, ~51
         58        ASSIGN                                                   !8, ~52
   22    59        COUNT                                            ~54     !1
         60        MUL                                              ~55     !6, ~54
         61        DIV                                              ~56     !8, ~55
         62        ASSIGN                                                   !8, ~56
   23    63        INIT_FCALL                                               'strtolower'
         64        CAST                                          6  ~58     !8
         65        SEND_VAL                                                 ~58
         66        DO_ICALL                                         $59     
         67        ASSIGN                                                   !8, $59
   24    68        INIT_FCALL                                               'strtok'
         69        SEND_VAR                                                 !8
         70        SEND_VAL                                                 'e'
         71        DO_ICALL                                         $61     
         72        ASSIGN                                                   !8, $61
   25    73        INIT_FCALL                                               'base64_encode'
         74        SEND_VAR                                                 !8
         75        DO_ICALL                                         $63     
         76        ASSIGN                                                   !8, $63
   26    77        CONCAT                                           ~65     !8, !0
         78        ASSIGN                                                   !8, ~65
   27    79        INIT_FCALL                                               'base64_encode'
         80        SEND_VAR                                                 !8
         81        DO_ICALL                                         $67     
         82        ASSIGN                                                   !8, $67
   28    83        ASSIGN                                                   !9, <array>
   29    84        INIT_FCALL                                               'str_split'
         85        SEND_VAR                                                 !8
         86        DO_ICALL                                         $70     
         87        ASSIGN                                                   !10, $70
   30    88        ASSIGN                                                   !11, 0
         89      > JMP                                                      ->105
   31    90    >   INIT_FCALL                                               'unpack'
         91        SEND_VAL                                                 'H%2A'
         92        FETCH_DIM_R                                      ~73     !10, !11
         93        SEND_VAL                                                 ~73
         94        DO_ICALL                                         $74     
         95        ASSIGN                                                   !12, $74
   32    96        INIT_FCALL                                               'base_convert'
         97        FETCH_DIM_R                                      ~77     !12, 1
         98        SEND_VAL                                                 ~77
         99        SEND_VAL                                                 16
        100        SEND_VAL                                                 2
        101        DO_ICALL                                         $78     
        102        ASSIGN_DIM                                               !9, !11
        103        OP_DATA                                                  $78
   30   104        PRE_INC                                                  !11
        105    >   COUNT                                            ~80     !10
        106        IS_SMALLER                                               !11, ~80
        107      > JMPNZ                                                    ~81, ->90
   34   108    >   ASSIGN                                                   !8, 1
   35   109        ASSIGN                                                   !13, 0
        110      > JMP                                                      ->116
   36   111    >   FETCH_DIM_R                                      ~84     !9, !13
        112        CAST                                          4  ~85     ~84
        113        MUL                                              ~86     !8, ~85
        114        ASSIGN                                                   !8, ~86
   35   115        PRE_INC                                                  !13
        116    >   COUNT                                            ~89     !9
        117        IS_SMALLER                                               !13, ~89
        118      > JMPNZ                                                    ~90, ->111
   38   119    >   INIT_FCALL                                               'abs'
        120        INIT_FCALL                                               'tan'
        121        COUNT                                            ~91     !9
        122        SEND_VAL                                                 ~91
        123        DO_ICALL                                         $92     
        124        SEND_VAR                                                 $92
        125        DO_ICALL                                         $93     
        126        MUL                                              ~94     !8, $93
        127        ASSIGN                                                   !8, ~94
   39   128        INIT_FCALL                                               'base64_encode'
        129        SEND_VAR                                                 !8
        130        DO_ICALL                                         $96     
        131        ASSIGN                                                   !8, $96
   40   132        INIT_FCALL                                               'substr'
        133        SEND_VAR                                                 !8
        134        SEND_VAL                                                 0
        135        SEND_VAL                                                 32
        136        DO_ICALL                                         $98     
        137        ASSIGN                                                   !8, $98
   41   138      > RETURN                                                   !8
   42   139*     > RETURN                                                   null

End of function rmshash

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.59 ms | 1402 KiB | 32 Q