php-src/ext/standard/tests/strings/bug53021.phpt
Gustavo André dos Santos Lopes 4e2fd7eeba - Fixed a typo in rev #304208 (24 instead of 34/'"').
- Improved the test bug53021.phpt to reflect other fixes in rev #304208.
- Updated NEWS to reflect other fixes in rev #304208.
2010-10-08 17:27:19 +00:00

35 lines
997 B
PHP

--TEST--
Bug #53021 (Failure to convert numeric entities with ENT_NOQUOTES and ISO-8859-1)
--FILE--
<?php
var_dump(unpack("H*",html_entity_decode("&#233;", ENT_QUOTES, "ISO-8859-1")));
echo "double quotes variations:", "\n";
echo html_entity_decode("&quot;", ENT_NOQUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&#34;", ENT_NOQUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&quot;", ENT_QUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&#34;", ENT_QUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&quot;", ENT_COMPAT, 'UTF-8'), "\n";
echo html_entity_decode("&#34;", ENT_COMPAT, 'UTF-8'), "\n";
echo "\nsingle quotes variations:", "\n";
echo html_entity_decode("&#39;", ENT_NOQUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&#39;", ENT_QUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&#39;", ENT_COMPAT, 'UTF-8'), "\n";
--EXPECT--
array(1) {
[1]=>
string(2) "e9"
}
double quotes variations:
&quot;
&#34;
"
"
"
"
single quotes variations:
&#39;
'
&#39;