3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo shortenb64(2773545392); function shortenb64($id, $alphabet='-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz') { $base = strlen($alphabet); $short = ''; while($id) { $id = round(($id-($r=$id%$base))/$base); $short = $alphabet{$r} . $short; } return $short; }
Output for 4.3.0 - 7.1.0
1_JE5k