3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define("base64alphabet",'-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz'); function epxandb64($id, $alphabet=base64alphabet) { $base = strlen($alphabet); $len = strlen($id)-1; $long = 0.0; $mul=1; for($i=$len;$i>=0;$i--) { $long += strpos($alphabet, substr($id, $i,1))*$mul; $mul *= $base; } return $long; } echo epxandb64('0HcvFJMbvGx5rA');
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
3.9025384697965E+23