Annotation of embedaddon/php/ext/standard/tests/url/base64_decode_basic_001.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test base64_decode() function : basic functionality - ensure all base64 alphabet is supported.
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : proto string base64_decode(string str[, bool strict])
                      6:  * Description: Decodes string using MIME base64 algorithm 
                      7:  * Source code: ext/standard/base64.c
                      8:  * Alias to functions: 
                      9:  */
                     10: 
                     11: echo "Decode an input string containing the whole base64 alphabet:\n";
                     12: $allbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
                     13: var_dump(bin2hex(base64_decode($allbase64)));
                     14: var_dump(bin2hex(base64_decode($allbase64, false)));
                     15: var_dump(bin2hex(base64_decode($allbase64, true)));
                     16: 
                     17: echo "Done";
                     18: ?>
                     19: --EXPECTF--
                     20: Decode an input string containing the whole base64 alphabet:
                     21: string(96) "00108310518720928b30d38f41149351559761969b71d79f8218a39259a7a29aabb2dbafc31cb3d35db7e39ebbf3dfbf"
                     22: string(96) "00108310518720928b30d38f41149351559761969b71d79f8218a39259a7a29aabb2dbafc31cb3d35db7e39ebbf3dfbf"
                     23: string(96) "00108310518720928b30d38f41149351559761969b71d79f8218a39259a7a29aabb2dbafc31cb3d35db7e39ebbf3dfbf"
                     24: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>