3v4l.org

run code in 300+ PHP versions simultaneously
<?php $return = ''; $base = '01234567890'; $num = 11112887; $result_62 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $base_arr = str_split($base); $base_len = 10; $result_62_arr = str_split($result_62); $result_62_len = 62; $num_arr = str_split($num); $num_len = strlen($num); while($num != '0') { $return = $result_62_arr[bcmod($num,62)].$return; $num = bcdiv($num,62,0); } echo $return;

preferences:
55.49 ms | 402 KiB | 5 Q