mirror of
https://github.com/php/php-src.git
synced 2026-04-23 07:58:20 +02:00
d9f3ca705c
Implements initial stage of accepted RFC to remove them: https://wiki.php.net/rfc/remove_utf8_decode_and_utf8_encode Tests relating to SOAP and htmlspecialchars seem to have been using this entirely unnecessarily, so have been fixed. Closes GH-8726.
26 lines
544 B
PHP
26 lines
544 B
PHP
--TEST--
|
|
Bug #49687 Several utf8_decode deficiencies and vulnerabilities
|
|
--FILE--
|
|
<?php
|
|
|
|
$tests = array(
|
|
"\x41\xC2\x3E\x42",
|
|
"\xE3\x80\x22",
|
|
"\x41\x98\xBA\x42\xE2\x98\x43\xE2\x98\xBA\xE2\x98",
|
|
);
|
|
foreach ($tests as $t) {
|
|
echo bin2hex(utf8_decode($t)), "\n";
|
|
}
|
|
echo "Done.\n";
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: Function utf8_decode() is deprecated in %s on line %d
|
|
413f3e42
|
|
|
|
Deprecated: Function utf8_decode() is deprecated in %s on line %d
|
|
3f22
|
|
|
|
Deprecated: Function utf8_decode() is deprecated in %s on line %d
|
|
413f3f423f433f3f
|
|
Done.
|