]> granicus.if.org Git - php/commitdiff
Convert E_STRICT into E_NOTICE for htmlentities() function
authorGeorge Peter Banyard <girgias@php.net>
Sun, 14 Jul 2019 19:47:01 +0000 (21:47 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 18 Jul 2019 09:13:18 +0000 (11:13 +0200)
UPGRADING
ext/standard/html.c
ext/standard/tests/strings/htmlentities04.phpt
ext/standard/tests/strings/htmlentities08.phpt
ext/standard/tests/strings/htmlentities09.phpt
ext/standard/tests/strings/htmlentities13.phpt
ext/standard/tests/strings/htmlentities14.phpt
ext/standard/tests/strings/htmlentities21.phpt
ext/standard/tests/strings/htmlentities22.phpt
ext/standard/tests/strings/htmlentities23.phpt

index d8775eb419f97b8cc2ae0533915c1df5edd6a086..696f44e4f795cae08683914e205751aa87a1c797 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -135,6 +135,10 @@ PHP 7.4 UPGRADE NOTES
     Applications correctly using the constants PASSWORD_DEFAULT,
     PASSWORD_BCRYPT, PASSWORD_ARGON2I, and PASSWORD_ARGON2ID will continue to
     function correctly.
+  . htmlentities() will now throw a notice (instead of a strict standards
+    warning) if it is used with an encoding for which only basic entity
+    substitution is supported, in which case it is equivalent to
+    htmlspecialchars().
 
 - Tokenizer:
   . token_get_all() will now emit a T_BAD_CHARACTER token for unexpected
index a724338e4ad707b4015ce682046c26be0bb63d60..e9c46ba08311d0cb05b6a77d43f56498dd13973d 100644 (file)
@@ -1187,7 +1187,7 @@ PHPAPI zend_string *php_escape_html_entities_ex(unsigned char *old, size_t oldle
 
        if (all) { /* replace with all named entities */
                if (CHARSET_PARTIAL_SUPPORT(charset)) {
-                       php_error_docref(NULL, E_STRICT, "Only basic entities "
+                       php_error_docref(NULL, E_NOTICE, "Only basic entities "
                                "substitution is supported for multi-byte encodings other than UTF-8; "
                                "functionality is equivalent to htmlspecialchars");
                }
index 066972ea42607b99c7888c238d5fe2944f5cc3e0..33f38682da25bd24178c67b5c8cd9fa62479fbe5 100644 (file)
@@ -17,5 +17,5 @@ internal_encoding=pass
        var_dump(htmlentities("\xa1\xa2\xa1\xa3\xa1\xa4", ENT_QUOTES, ''));
 ?>
 --EXPECTF--
-Strict Standards: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(6) "¡¢¡£¡¤"
index 465e36283792c0f179de462d4ee4cb29e4b22337..b44796ec801300801072b562d67f1038745dd7e8 100644 (file)
@@ -2,7 +2,6 @@
 htmlentities() test 8 (mbstring / EUC-JP)
 --INI--
 output_handler=
-error_reporting=~E_STRICT
 internal_encoding=EUC-JP
 --SKIPIF--
 <?php
@@ -13,6 +12,8 @@ internal_encoding=EUC-JP
        print mb_internal_encoding()."\n";
        var_dump(htmlentities("\xa1\xa2\xa1\xa3\xa1\xa4", ENT_QUOTES, ''));
 ?>
---EXPECT--
+--EXPECTF--
 EUC-JP
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(6) "¡¢¡£¡¤"
index d1714ebded2d2e62017342fc8a0bbcf614187ce4..655c6d7a26d0815ec18a69d26a2e240b70d9a690 100644 (file)
@@ -2,7 +2,6 @@
 htmlentities() test 9 (mbstring / Shift_JIS)
 --INI--
 output_handler=
-error_reporting=~E_STRICT
 internal_encoding=Shift_JIS
 --SKIPIF--
 <?php
@@ -14,7 +13,9 @@ internal_encoding=Shift_JIS
        var_dump(bin2hex(htmlentities("\x81\x41\x81\x42\x81\x43", ENT_QUOTES, '')));
 ?>
 ===DONE===
---EXPECT--
+--EXPECTF--
 SJIS
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(12) "814181428143"
 ===DONE===
index 5113d7d1615cac82864a856851ee100e2855a1ae..bdea7a30ee4286ce1ace7ef6058d9edffd68dcf4 100644 (file)
@@ -13,5 +13,5 @@ filter.default=unsafe_raw
 --EXPECTF--
 EUC-JP
 
-Strict Standards: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s on line %d
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s on line %d
 string(6) "¡¢¡£¡¤"
index 1cf2769df7fb503f05ee318b9c0b09af49f0d807..e39a0037263e56eba319e228be69f6652a1cf8dc 100644 (file)
@@ -13,5 +13,5 @@ filter.default=unsafe_raw
 --EXPECTF--
 Shift_JIS
 
-Strict Standards: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s on line %d
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s on line %d
 string(6) "\81A\81B\81C"
index f34ff26df09116e6e582bb3709852bc418842e18..a1a9dad21c76c69c19c7c624157c8e2980df31ba 100644 (file)
@@ -22,7 +22,6 @@ $tests = array(
 function test($flag, $charset) {
     global $tests;
     $i = -1;
-    error_reporting(-1 & ~E_STRICT);
     foreach ($tests as $test) {
         $test = chr($test);
         $i++;
@@ -31,7 +30,6 @@ function test($flag, $charset) {
         if ($a == "" && $b == "") { echo sprintf("%05X", $tests[$i]), ": INVALID SEQUENCE\n"; continue; }
         echo sprintf("%05X", $tests[$i]), ": ", bin2hex($a), " ", bin2hex($b), "\n";
     }
-    error_reporting(-1);
 }
 
 echo "*** Testing HTML 4.01/Windows-1251 ***\n";
@@ -68,7 +66,7 @@ test(ENT_XML1, "SJIS");
 
 
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing HTML 4.01/Windows-1251 ***
 00000: 262378464646443b 262378464646443b
 00001: 262378464646443b 262378464646443b
@@ -134,65 +132,177 @@ test(ENT_XML1, "SJIS");
 000A0: a0 a0
 
 *** Testing HTML 4.01/SJIS ***
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00000: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00001: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00009: 09 09
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000A: 0a 0a
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000B: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000C: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000D: 0d 0d
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000E: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0001F: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00020: 20 20
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0007F: 7f 7f
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00080: INVALID SEQUENCE
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0009F: INVALID SEQUENCE
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 000A0: INVALID SEQUENCE
 
 *** Testing XHTML 1.0/SJIS ***
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00000: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00001: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00009: 09 09
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000A: 0a 0a
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000B: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000C: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000D: 0d 0d
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000E: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0001F: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00020: 20 20
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0007F: 7f 7f
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00080: INVALID SEQUENCE
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0009F: INVALID SEQUENCE
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 000A0: INVALID SEQUENCE
 
 *** Testing HTML 5/SJIS ***
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00000: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00001: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00009: 09 09
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000A: 0a 0a
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000B: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000C: 0c 0c
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000D: 0d 0d
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000E: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0001F: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00020: 20 20
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0007F: 7f 7f
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00080: INVALID SEQUENCE
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0009F: INVALID SEQUENCE
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 000A0: INVALID SEQUENCE
 
 *** Testing XML 1.0/SJIS ***
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00000: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00001: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00009: 09 09
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000A: 0a 0a
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000B: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000C: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000D: 0d 0d
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0000E: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0001F: 262378464646443b 262378464646443b
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00020: 20 20
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0007F: 7f 7f
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 00080: INVALID SEQUENCE
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 0009F: INVALID SEQUENCE
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 000A0: INVALID SEQUENCE
index 82dae2ba0838130516bd343188e8a5771f9f930d..326a119e4b796e61d5979895747a6f9184bc40f1 100644 (file)
@@ -35,7 +35,6 @@ $tests = array(
 function test($flag, $flag2=ENT_DISALLOWED, $charset="UTF-8") {
     global $tests;
     $i = -1;
-    error_reporting(-1 & ~E_STRICT);
     foreach ($tests as $test) {
         $i++;
         $a = htmlentities($test, $flag | $flag2, $charset, FALSE);
@@ -46,7 +45,6 @@ function test($flag, $flag2=ENT_DISALLOWED, $charset="UTF-8") {
         else
             echo sprintf("%s\tCHANGED (%s, %s)", $test, $a, $b), "\n";
     }
-    error_reporting(-1);
 }
 
 echo "*** Testing HTML 4.01 ***\n";
@@ -78,7 +76,7 @@ echo "\n*** Testing HTML 5 with another multibyte-byte encoding ***\n";
 test(ENT_HTML5, ENT_DISALLOWED, "SJIS");
 
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing HTML 4.01 ***
 &#0;   NOT CHANGED
 &#1;   NOT CHANGED
@@ -254,30 +252,84 @@ test(ENT_HTML5, ENT_DISALLOWED, "SJIS");
 &#x110000;     CHANGED (&amp;&num;x110000&semi;, &amp;#x110000;)
 
 *** Testing HTML 5 with another multibyte-byte encoding ***
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#0;   CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#1;   CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x09; NOT CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x0A; NOT CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x0B; CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x0C; NOT CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x0D; CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x0E; CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x1F; CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x20; NOT CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x7F; CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x80; CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x9F; CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#xA0; NOT CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#xD7FF;       NOT CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#xD800;       NOT CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#xDFFF;       NOT CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#xE000;       NOT CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#xFFFE;       CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#xFFFF;       CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#xFDCF;       NOT CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#xFDD0;       CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#xFDEF;       CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#xFDF0;       NOT CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x2FFFE;      CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x2FFFF;      CHANGED
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 &#x110000;     CHANGED
index bcfcd8d8f7174dbde4559108c17d3b560d3cec1d..68e6e9439e98793593cd187c9128947a2fa73899 100644 (file)
@@ -19,76 +19,100 @@ $tests = array(
 );
 
 foreach ($tests as $test) {
-    error_reporting(~E_STRICT);
     $a = htmlentities($test, ENT_QUOTES | ENT_SUBSTITUTE, "EUC-JP");
-    error_reporting(-1);
        var_dump($a, bin2hex($a));
     $a = htmlspecialchars($test, ENT_QUOTES | ENT_SUBSTITUTE, "EUC-JP");
        var_dump($a, bin2hex($a));
     echo "\n";
 }
 ?>
---EXPECT--
+--EXPECTF--
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(16) "&#xFFFD;&#xFFFD;"
 string(32) "262378464646443b262378464646443b"
 string(16) "&#xFFFD;&#xFFFD;"
 string(32) "262378464646443b262378464646443b"
 
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(16) "&#xFFFD;&#xFFFD;"
 string(32) "262378464646443b262378464646443b"
 string(16) "&#xFFFD;&#xFFFD;"
 string(32) "262378464646443b262378464646443b"
 
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(8) "&#xFFFD;"
 string(16) "262378464646443b"
 string(8) "&#xFFFD;"
 string(16) "262378464646443b"
 
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(8) "&#xFFFD;"
 string(16) "262378464646443b"
 string(8) "&#xFFFD;"
 string(16) "262378464646443b"
 
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(17) "&#xFFFD;&#xFFFD;!"
 string(34) "262378464646443b262378464646443b21"
 string(17) "&#xFFFD;&#xFFFD;!"
 string(34) "262378464646443b262378464646443b21"
 
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(9) "&#xFFFD;!"
 string(18) "262378464646443b21"
 string(9) "&#xFFFD;!"
 string(18) "262378464646443b21"
 
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(2) "\8e®"
 string(4) "8eae"
 string(2) "\8e®"
 string(4) "8eae"
 
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(8) "&#xFFFD;"
 string(16) "262378464646443b"
 string(8) "&#xFFFD;"
 string(16) "262378464646443b"
 
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(9) "&#xFFFD;!"
 string(18) "262378464646443b21"
 string(9) "&#xFFFD;!"
 string(18) "262378464646443b21"
 
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(8) "&#xFFFD;"
 string(16) "262378464646443b"
 string(8) "&#xFFFD;"
 string(16) "262378464646443b"
 
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(8) "&#xFFFD;"
 string(16) "262378464646443b"
 string(8) "&#xFFFD;"
 string(16) "262378464646443b"
 
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(9) "&#xFFFD;!"
 string(18) "262378464646443b21"
 string(9) "&#xFFFD;!"
 string(18) "262378464646443b21"
 
+
+Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
 string(8) "&#xFFFD;"
 string(16) "262378464646443b"
 string(8) "&#xFFFD;"