Mapping between integer and pronounceable word
PHP, 353 Bytes
Encoding + Decoding
is_numeric($argn)
contains the boolean. It is true if the input is an integer.
$c=array_diff(range(A,Z),$v=[A,E,I,O,U,Y]);sort($c);if(is_numeric($a=$argn)){$r=($a)%26<6?$v[$a%26]:$c[$a%26-6];$a=$a/26^0;while($a){$z=count($t=in_array($r[0],$v)?$c:$v);$r=$t[$n=$a%$z].$r;$a=$a/$z^0;}echo$r;}else{for($p=1;$i++<strlen($a);){$u=($b=in_array($a[-$i],$c))?$c:$v;$s+=array_flip($u)[$a[-$i]]*$p+($b&$i<2?6:0);$p*=$i>1?count($u):26;}echo$s;}
PHP, 190 Bytes (Encode) + 195 Byte (Decode) = 385 Bytes
Encoding
$c=array_diff(range(A,Z),$v=[A,E,I,O,U,Y]);sort($c);$r=($a=$argn)%26<6?$v[$a%26]:$c[$a%26-6];$a=$a/26^0;while($a){$z=count($t=in_array($r[0],$v)?$c:$v);$r=$t[$n=$a%$z].$r;$a=$a/$z^0;}echo$r;
5391360000=26*120**4 combinations are available
Online Version Encoding without E_NOTICE
Expanded
$c=array_diff(range(A,Z),$v=[A,E,I,O,U,Y]);
sort($c); # End of Prepare the two array
$r=($a=$argn)%26<6?$v[$a%26]:$c[$a%26-6]; #base 26 decision input mod 26 <6 end with vowel
$a=$a/26^0; #integer division input with 26
while($a){
$z=count($t=in_array($r[0],$v)?$c:$v); # use vowel if last entry is consonant and viceversa
$r=$t[$n=$a%$z].$r; # base 6 or base 20 decision
$a=$a/$z^0; # divide through base
}echo$r; # Output result
Input => Output
4294967296 => TYPYQACOV
333 => DAT
1 => E
7 => C
4294967276 => UTOPOQAMI
If you need always 9 Byte result please replace while($a)
with while(strlen($r)<9)
+ 10 Bytes
Decoding
$c=array_diff(range(A,Z),$v=[A,E,I,O,U,Y]);sort($c);for($p=1;$i++<strlen($a=$argn);){$u=($b=in_array($a[-$i],$c))?$c:$v;$s+=array_flip($u)[$a[-$i]]*$p+($b&$i<2?6:0);$p*=$i>1?count($u):26;}echo$s;
Expanded
$c=array_diff(range("A","Z"),$v=["A","E","I","O","U","Y"]);
sort($c); # End of Prepare the two array
for($p=1;$i++<strlen($a=$argn);){
$u=($b=in_array($a[-$i],$c))?$c:$v; # find use array for $a[-$i]
$s+=array_flip($u)[$a[-$i]]*$p+($b&$i<2?6:0); # sum value
$p*=$i>1?count($u):26; # raise multiple for next item
}echo$s;
Input => Output
ABABABABE => 1
E => 1
UTOPOQAMI => 4294967276
BABABADAT => 333
DAT => 333
TYPYQACOV => 4294967296
Online Version Decoding without E_NOTICE
Additional Check
If we need a check if a string is valid.
Add $x.=$b?:0;
in the end of the decoding loop + 10 Bytes
Replace echo$s;
with echo!preg_match('#([01])\1$#',$x)?$s:_;
+ 32 Bytes