1--TEST-- 2Test 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 11echo "Decode an input string containing the whole base64 alphabet:\n"; 12$allbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/VV=="; 13var_dump(bin2hex(base64_decode($allbase64))); 14var_dump(bin2hex(base64_decode($allbase64, false))); 15var_dump(bin2hex(base64_decode($allbase64, true))); 16 17echo "Done"; 18?> 19--EXPECT-- 20Decode an input string containing the whole base64 alphabet: 21string(98) "00108310518720928b30d38f41149351559761969b71d79f8218a39259a7a29aabb2dbafc31cb3d35db7e39ebbf3dfbf55" 22string(98) "00108310518720928b30d38f41149351559761969b71d79f8218a39259a7a29aabb2dbafc31cb3d35db7e39ebbf3dfbf55" 23string(98) "00108310518720928b30d38f41149351559761969b71d79f8218a39259a7a29aabb2dbafc31cb3d35db7e39ebbf3dfbf55" 24Done 25