1--TEST--
2html_entity_decode() conformance check (HTML 4)
3--FILE--
4<?php
5$map = array(
6    "&quot;",
7    "&amp;",
8    "&lt;",
9    "&gt;",
10    "&nbsp;",
11    "&iexcl;",
12    "&cent;",
13    "&pound;",
14    "&curren;",
15    "&yen;",
16    "&brvbar;",
17    "&sect;",
18    "&uml;",
19    "&copy;",
20    "&ordf;",
21    "&laquo;",
22    "&not;",
23    "&shy;",
24    "&reg;",
25    "&macr;",
26    "&deg;",
27    "&plusmn;",
28    "&sup2;",
29    "&sup3;",
30    "&acute;",
31    "&micro;",
32    "&para;",
33    "&middot;",
34    "&cedil;",
35    "&sup1;",
36    "&ordm;",
37    "&raquo;",
38    "&frac14;",
39    "&frac12;",
40    "&frac34;",
41    "&iquest;",
42    "&Agrave;",
43    "&Aacute;",
44    "&Acirc;",
45    "&Atilde;",
46    "&Auml;",
47    "&Aring;",
48    "&AElig;",
49    "&Ccedil;",
50    "&Egrave;",
51    "&Eacute;",
52    "&Ecirc;",
53    "&Euml;",
54    "&Igrave;",
55    "&Iacute;",
56    "&Icirc;",
57    "&Iuml;",
58    "&ETH;",
59    "&Ntilde;",
60    "&Ograve;",
61    "&Oacute;",
62    "&Ocirc;",
63    "&Otilde;",
64    "&Ouml;",
65    "&times;",
66    "&Oslash;",
67    "&Ugrave;",
68    "&Uacute;",
69    "&Ucirc;",
70    "&Uuml;",
71    "&Yacute;",
72    "&THORN;",
73    "&szlig;",
74    "&agrave;",
75    "&aacute;",
76    "&acirc;",
77    "&atilde;",
78    "&auml;",
79    "&aring;",
80    "&aelig;",
81    "&ccedil;",
82    "&egrave;",
83    "&eacute;",
84    "&ecirc;",
85    "&euml;",
86    "&igrave;",
87    "&iacute;",
88    "&icirc;",
89    "&iuml;",
90    "&eth;",
91    "&ntilde;",
92    "&ograve;",
93    "&oacute;",
94    "&ocirc;",
95    "&otilde;",
96    "&ouml;",
97    "&divide;",
98    "&oslash;",
99    "&ugrave;",
100    "&uacute;",
101    "&ucirc;",
102    "&uuml;",
103    "&yacute;",
104    "&thorn;",
105    "&yuml;",
106    "&OElig;",
107    "&oelig;",
108    "&Scaron;",
109    "&scaron;",
110    "&Yuml;",
111    "&fnof;",
112    "&circ;",
113    "&tilde;",
114    "&Alpha;",
115    "&Beta;",
116    "&Gamma;",
117    "&Delta;",
118    "&Epsilon;",
119    "&Zeta;",
120    "&Eta;",
121    "&Theta;",
122    "&Iota;",
123    "&Kappa;",
124    "&Lambda;",
125    "&Mu;",
126    "&Nu;",
127    "&Xi;",
128    "&Omicron;",
129    "&Pi;",
130    "&Rho;",
131    "&Sigma;",
132    "&Tau;",
133    "&Upsilon;",
134    "&Phi;",
135    "&Chi;",
136    "&Psi;",
137    "&Omega;",
138    "&alpha;",
139    "&beta;",
140    "&gamma;",
141    "&delta;",
142    "&epsilon;",
143    "&zeta;",
144    "&eta;",
145    "&theta;",
146    "&iota;",
147    "&kappa;",
148    "&lambda;",
149    "&mu;",
150    "&nu;",
151    "&xi;",
152    "&omicron;",
153    "&pi;",
154    "&rho;",
155    "&sigmaf;",
156    "&sigma;",
157    "&tau;",
158    "&upsilon;",
159    "&phi;",
160    "&chi;",
161    "&psi;",
162    "&omega;",
163    "&thetasym;",
164    "&upsih;",
165    "&piv;",
166    "&ensp;",
167    "&emsp;",
168    "&thinsp;",
169    "&zwnj;",
170    "&zwj;",
171    "&lrm;",
172    "&rlm;",
173    "&ndash;",
174    "&mdash;",
175    "&lsquo;",
176    "&rsquo;",
177    "&sbquo;",
178    "&ldquo;",
179    "&rdquo;",
180    "&bdquo;",
181    "&dagger;",
182    "&Dagger;",
183    "&bull;",
184    "&hellip;",
185    "&permil;",
186    "&prime;",
187    "&Prime;",
188    "&lsaquo;",
189    "&rsaquo;",
190    "&oline;",
191    "&frasl;",
192    "&euro;",
193    "&image;",
194    "&weierp;",
195    "&real;",
196    "&trade;",
197    "&alefsym;",
198    "&larr;",
199    "&uarr;",
200    "&rarr;",
201    "&darr;",
202    "&harr;",
203    "&crarr;",
204    "&lArr;",
205    "&uArr;",
206    "&rArr;",
207    "&dArr;",
208    "&hArr;",
209    "&forall;",
210    "&part;",
211    "&exist;",
212    "&empty;",
213    "&nabla;",
214    "&isin;",
215    "&notin;",
216    "&ni;",
217    "&prod;",
218    "&sum;",
219    "&minus;",
220    "&lowast;",
221    "&radic;",
222    "&prop;",
223    "&infin;",
224    "&ang;",
225    "&and;",
226    "&or;",
227    "&cap;",
228    "&cup;",
229    "&int;",
230    "&there4;",
231    "&sim;",
232    "&cong;",
233    "&asymp;",
234    "&ne;",
235    "&equiv;",
236    "&le;",
237    "&ge;",
238    "&sub;",
239    "&sup;",
240    "&nsub;",
241    "&sube;",
242    "&supe;",
243    "&oplus;",
244    "&otimes;",
245    "&perp;",
246    "&sdot;",
247    "&lceil;",
248    "&rceil;",
249    "&lfloor;",
250    "&rfloor;",
251    "&lang;",
252    "&rang;",
253    "&loz;",
254    "&spades;",
255    "&clubs;",
256    "&hearts;",
257    "&diams;"
258);
259
260foreach ($map as $str) {
261    echo bin2hex(html_entity_decode($str, ENT_QUOTES, "UTF-8")), "\n";
262}
263?>
264--EXPECT--
26522
26626
2673c
2683e
269c2a0
270c2a1
271c2a2
272c2a3
273c2a4
274c2a5
275c2a6
276c2a7
277c2a8
278c2a9
279c2aa
280c2ab
281c2ac
282c2ad
283c2ae
284c2af
285c2b0
286c2b1
287c2b2
288c2b3
289c2b4
290c2b5
291c2b6
292c2b7
293c2b8
294c2b9
295c2ba
296c2bb
297c2bc
298c2bd
299c2be
300c2bf
301c380
302c381
303c382
304c383
305c384
306c385
307c386
308c387
309c388
310c389
311c38a
312c38b
313c38c
314c38d
315c38e
316c38f
317c390
318c391
319c392
320c393
321c394
322c395
323c396
324c397
325c398
326c399
327c39a
328c39b
329c39c
330c39d
331c39e
332c39f
333c3a0
334c3a1
335c3a2
336c3a3
337c3a4
338c3a5
339c3a6
340c3a7
341c3a8
342c3a9
343c3aa
344c3ab
345c3ac
346c3ad
347c3ae
348c3af
349c3b0
350c3b1
351c3b2
352c3b3
353c3b4
354c3b5
355c3b6
356c3b7
357c3b8
358c3b9
359c3ba
360c3bb
361c3bc
362c3bd
363c3be
364c3bf
365c592
366c593
367c5a0
368c5a1
369c5b8
370c692
371cb86
372cb9c
373ce91
374ce92
375ce93
376ce94
377ce95
378ce96
379ce97
380ce98
381ce99
382ce9a
383ce9b
384ce9c
385ce9d
386ce9e
387ce9f
388cea0
389cea1
390cea3
391cea4
392cea5
393cea6
394cea7
395cea8
396cea9
397ceb1
398ceb2
399ceb3
400ceb4
401ceb5
402ceb6
403ceb7
404ceb8
405ceb9
406ceba
407cebb
408cebc
409cebd
410cebe
411cebf
412cf80
413cf81
414cf82
415cf83
416cf84
417cf85
418cf86
419cf87
420cf88
421cf89
422cf91
423cf92
424cf96
425e28082
426e28083
427e28089
428e2808c
429e2808d
430e2808e
431e2808f
432e28093
433e28094
434e28098
435e28099
436e2809a
437e2809c
438e2809d
439e2809e
440e280a0
441e280a1
442e280a2
443e280a6
444e280b0
445e280b2
446e280b3
447e280b9
448e280ba
449e280be
450e28184
451e282ac
452e28491
453e28498
454e2849c
455e284a2
456e284b5
457e28690
458e28691
459e28692
460e28693
461e28694
462e286b5
463e28790
464e28791
465e28792
466e28793
467e28794
468e28880
469e28882
470e28883
471e28885
472e28887
473e28888
474e28889
475e2888b
476e2888f
477e28891
478e28892
479e28897
480e2889a
481e2889d
482e2889e
483e288a0
484e288a7
485e288a8
486e288a9
487e288aa
488e288ab
489e288b4
490e288bc
491e28985
492e28988
493e289a0
494e289a1
495e289a4
496e289a5
497e28a82
498e28a83
499e28a84
500e28a86
501e28a87
502e28a95
503e28a97
504e28aa5
505e28b85
506e28c88
507e28c89
508e28c8a
509e28c8b
510e28ca9
511e28caa
512e2978a
513e299a0
514e299a3
515e299a5
516e299a6
517