3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo shortenb64(2773545392); function shortenb64($id, $alphabet=base64alphabet) { $base = strlen($alphabet); $short = ''; while($id) { $id = round(($id-($r=$id%$base))/$base); $short = $alphabet{$r} . $short; } return $short; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Use of undefined constant base64alphabet - assumed 'base64alphabet' in /in/r1OXS on line 5 ae66thebs