1--TEST--
2Bug #53021 (Failure to convert numeric entities with ENT_NOQUOTES and ISO-8859-1)
3--FILE--
4<?php
5var_dump(unpack("H*",html_entity_decode("&#233;", ENT_QUOTES, "ISO-8859-1")));
6echo "double quotes variations:", "\n";
7echo html_entity_decode("&quot;", ENT_NOQUOTES, 'UTF-8'), "\n";
8echo html_entity_decode("&#34;", ENT_NOQUOTES, 'UTF-8'), "\n";
9echo html_entity_decode("&quot;", ENT_QUOTES, 'UTF-8'), "\n";
10echo html_entity_decode("&#34;", ENT_QUOTES, 'UTF-8'), "\n";
11echo html_entity_decode("&quot;", ENT_COMPAT, 'UTF-8'), "\n";
12echo html_entity_decode("&#34;", ENT_COMPAT, 'UTF-8'), "\n";
13echo html_entity_decode("&quot;"), "\n";
14echo html_entity_decode("&#34;"), "\n";
15
16echo "\nsingle quotes variations:", "\n";
17echo html_entity_decode("&#39;", ENT_NOQUOTES, 'UTF-8'), "\n";
18echo html_entity_decode("&#39;", ENT_QUOTES, 'UTF-8'), "\n";
19echo html_entity_decode("&#39;", ENT_COMPAT, 'UTF-8'), "\n";
20echo html_entity_decode("&#39;"), "\n";
21?>
22--EXPECT--
23array(1) {
24  [1]=>
25  string(2) "e9"
26}
27double quotes variations:
28&quot;
29&#34;
30"
31"
32"
33"
34"
35"
36
37single quotes variations:
38&#39;
39'
40&#39;
41'
42