import zend standard tests
[hiphop-php.git] / hphp / test / zend / bad / ext-standard-strings / htmlentities19.php
blobcb04cf607a804f132926de6377cefc1156c857cb
1 <?php
2 $tests = array(
3 "\x41\xC2\x3E\x42", // Unicode TR #36, 3.1.1; do not consume valid successor bytes
4 "\xE3\x80\x22", // Unicode TR #36, 3.6.1; use strategy #2
5 "\x41\x98\xBA\x42\xE2\x98\x43\xE2\x98\xBA\xE2\x98", // example from HTML5, section 2.4
6 );
8 foreach ($tests as $test) {
9 $a = htmlentities($test, ENT_QUOTES | ENT_SUBSTITUTE, "UTF-8");
10 var_dump($a, bin2hex($a));
11 $a = htmlspecialchars($test, ENT_QUOTES | ENT_SUBSTITUTE, "UTF-8");
12 var_dump($a, bin2hex($a));