From: Jerome Jutteau Date: Wed, 9 Jan 2013 22:37:12 +0000 (+0100) Subject: better array construction for base_16_to_64 construction X-Git-Tag: 1.1~228 X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/commitdiff_plain/a23a86c48b1675e131fe80e7a332b46422ebf846?hp=6bf56aac5e2854b55fae391a86182c064209c0b2 better array construction for base_16_to_64 construction --- diff --git a/lib/functions.php b/lib/functions.php index f1d81f4..10fc0ab 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -38,14 +38,11 @@ s2p ($s) function base_16_to_64 ($num) { - $o = ''; - $m = implode ('', array_merge (range (0,9), - range ('a', 'z'), - range ('A', 'Z'), - ['-', '_'])); + $m = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_'; + $o = ''; + $b = ''; $i = 0; $size = strlen ($num); - $b=''; for ($i = 0; $i < $size; $i++) $b .= base_convert ($num{$i}, 16, 2); $size = strlen ($b);