--TEST-- html_entity_decode: Decoding of entities after invalid entities --FILE-- html_entity_decode inconsistency","\n", "$b <-> $a","\n"; } } echo html_entity_decode($ent, ENT_QUOTES, 'UTF-8'), "\n"; } echo "Done.\n"; --EXPECT-- & && &$ &#& &#$ &#x& &#x$ & $ & $ & $ & $ &a& &a$ &aa& &aa$ &aa;& &aa;$ &;& &;$ Done.