php-src/ext/standard/tests/strings/bug37244.phpt
Steph Fox 87fac43ac0 - killed off UEXPECT
- html_translation_table and setlocale tests are no longer relevant
- there are a number of ANSI-encoded files. Is this deliberate?
2008-05-27 10:50:48 +00:00

18 lines
800 B
PHP
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--TEST--
Bug #37244 (base64_decode violates RFC 3548)
--FILE--
<?php
$strings = array(
'SW1wbGVtZW50YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu',
'SW1wbGVtZW$0YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu',
'SW1wbGVtZW0YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu'
);
foreach($strings as $string) {
var_dump(base64_decode($string, true));
}
?>
--EXPECT--
string(93) "Implementations MUST reject the encoding if it contains characters outside the base alphabet."
bool(false)
string(92) "Implemem][ÛœÈUTÕ™Z™XÝH[˜ÛÙ[™ÈYˆ]ÛÛ<C39B>Z[œÈÚ\˜\œÈÝ]ÚYHH˜\ÙH[X™] "