summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UPGRADING4
-rw-r--r--ext/standard/html.c2
-rw-r--r--ext/standard/tests/strings/htmlentities04.phpt2
-rw-r--r--ext/standard/tests/strings/htmlentities08.phpt5
-rw-r--r--ext/standard/tests/strings/htmlentities09.phpt5
-rw-r--r--ext/standard/tests/strings/htmlentities13.phpt2
-rw-r--r--ext/standard/tests/strings/htmlentities14.phpt2
-rw-r--r--ext/standard/tests/strings/htmlentities21.phpt116
-rw-r--r--ext/standard/tests/strings/htmlentities22.phpt58
-rw-r--r--ext/standard/tests/strings/htmlentities23.phpt30
10 files changed, 209 insertions, 17 deletions
diff --git a/UPGRADING b/UPGRADING
index d8775eb419..696f44e4f7 100644
--- 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
diff --git a/ext/standard/html.c b/ext/standard/html.c
index a724338e4a..e9c46ba083 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -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");
}
diff --git a/ext/standard/tests/strings/htmlentities04.phpt b/ext/standard/tests/strings/htmlentities04.phpt
index 066972ea42..33f38682da 100644
--- a/ext/standard/tests/strings/htmlentities04.phpt
+++ b/ext/standard/tests/strings/htmlentities04.phpt
@@ -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) "。「。」。、"
diff --git a/ext/standard/tests/strings/htmlentities08.phpt b/ext/standard/tests/strings/htmlentities08.phpt
index 465e362837..b44796ec80 100644
--- a/ext/standard/tests/strings/htmlentities08.phpt
+++ b/ext/standard/tests/strings/htmlentities08.phpt
@@ -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) "。「。」。、"
diff --git a/ext/standard/tests/strings/htmlentities09.phpt b/ext/standard/tests/strings/htmlentities09.phpt
index d1714ebded..655c6d7a26 100644
--- a/ext/standard/tests/strings/htmlentities09.phpt
+++ b/ext/standard/tests/strings/htmlentities09.phpt
@@ -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===
diff --git a/ext/standard/tests/strings/htmlentities13.phpt b/ext/standard/tests/strings/htmlentities13.phpt
index 5113d7d161..bdea7a30ee 100644
--- a/ext/standard/tests/strings/htmlentities13.phpt
+++ b/ext/standard/tests/strings/htmlentities13.phpt
@@ -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) "。「。」。、"
diff --git a/ext/standard/tests/strings/htmlentities14.phpt b/ext/standard/tests/strings/htmlentities14.phpt
index 1cf2769df7..e39a003726 100644
--- a/ext/standard/tests/strings/htmlentities14.phpt
+++ b/ext/standard/tests/strings/htmlentities14.phpt
@@ -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) "、。,"
diff --git a/ext/standard/tests/strings/htmlentities21.phpt b/ext/standard/tests/strings/htmlentities21.phpt
index f34ff26df0..a1a9dad21c 100644
--- a/ext/standard/tests/strings/htmlentities21.phpt
+++ b/ext/standard/tests/strings/htmlentities21.phpt
@@ -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
diff --git a/ext/standard/tests/strings/htmlentities22.phpt b/ext/standard/tests/strings/htmlentities22.phpt
index 82dae2ba08..326a119e4b 100644
--- a/ext/standard/tests/strings/htmlentities22.phpt
+++ b/ext/standard/tests/strings/htmlentities22.phpt
@@ -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
diff --git a/ext/standard/tests/strings/htmlentities23.phpt b/ext/standard/tests/strings/htmlentities23.phpt
index bcfcd8d8f7..68e6e9439e 100644
--- a/ext/standard/tests/strings/htmlentities23.phpt
+++ b/ext/standard/tests/strings/htmlentities23.phpt
@@ -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) "式"
string(4) "8eae"
string(2) "式"
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;"