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+/="; 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--EXPECTF-- 20Decode an input string containing the whole base64 alphabet: 21string(96) "00108310518720928b30d38f41149351559761969b71d79f8218a39259a7a29aabb2dbafc31cb3d35db7e39ebbf3dfbf" 22string(96) "00108310518720928b30d38f41149351559761969b71d79f8218a39259a7a29aabb2dbafc31cb3d35db7e39ebbf3dfbf" 23string(96) "00108310518720928b30d38f41149351559761969b71d79f8218a39259a7a29aabb2dbafc31cb3d35db7e39ebbf3dfbf" 24Done