summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/strings')
-rw-r--r--ext/standard/tests/strings/addslashes_variation2.phpt2
-rw-r--r--ext/standard/tests/strings/basename_invalid_path.phpt22
-rw-r--r--ext/standard/tests/strings/basename_invalid_path_win.phpt22
-rw-r--r--ext/standard/tests/strings/basename_variation.phpt2
-rw-r--r--ext/standard/tests/strings/bug21453.phpt4
-rw-r--r--ext/standard/tests/strings/bug54322.phpt5
-rw-r--r--ext/standard/tests/strings/bug55451.phpt14
-rw-r--r--ext/standard/tests/strings/bug55871.phpt32
-rw-r--r--ext/standard/tests/strings/bug61116.phpt29
-rw-r--r--ext/standard/tests/strings/bug68636.phpt21
-rw-r--r--ext/standard/tests/strings/bug69144.phpt15
-rw-r--r--ext/standard/tests/strings/bug70436.phpt18
-rw-r--r--ext/standard/tests/strings/bug70487.phpt10
-rw-r--r--ext/standard/tests/strings/bug70667.phpt9
-rw-r--r--ext/standard/tests/strings/bug71188.phpt28
-rw-r--r--ext/standard/tests/strings/bug71190.phpt27
-rw-r--r--ext/standard/tests/strings/bug71806.dat3
-rw-r--r--ext/standard/tests/strings/bug71806.phpt11
-rw-r--r--ext/standard/tests/strings/bug71969.phpt28
-rw-r--r--ext/standard/tests/strings/bug72100.phpt18
-rw-r--r--ext/standard/tests/strings/bug72152.phpt11
-rw-r--r--ext/standard/tests/strings/bug72263.phpt13
-rw-r--r--ext/standard/tests/strings/bug72264.phpt7
-rw-r--r--ext/standard/tests/strings/bug72433.phpt33
-rw-r--r--ext/standard/tests/strings/bug72434.phpt4
-rw-r--r--ext/standard/tests/strings/bug72663.phpt4
-rw-r--r--ext/standard/tests/strings/bug72663_2.phpt8
-rw-r--r--ext/standard/tests/strings/bug72703.phpt17
-rw-r--r--ext/standard/tests/strings/chunk_split_variation2.phpt28
-rw-r--r--ext/standard/tests/strings/chunk_split_variation5.phptbin2289 -> 2287 bytes
-rw-r--r--ext/standard/tests/strings/chunk_split_variation8.phpt4
-rw-r--r--ext/standard/tests/strings/count_chars_variation2.phpt12
-rw-r--r--ext/standard/tests/strings/crypt_blowfish_variation2.phpt4
-rw-r--r--ext/standard/tests/strings/dirname_error.phpt12
-rw-r--r--ext/standard/tests/strings/dirname_multi.phpt27
-rw-r--r--ext/standard/tests/strings/dirname_multi_win.phpt31
-rw-r--r--ext/standard/tests/strings/explode.phpt2
-rw-r--r--ext/standard/tests/strings/explode_variation3.phpt10
-rw-r--r--ext/standard/tests/strings/get_html_translation_table_basic6.phpt8
-rw-r--r--ext/standard/tests/strings/get_html_translation_table_variation1.phpt44
-rw-r--r--ext/standard/tests/strings/get_html_translation_table_variation2.phpt22
-rw-r--r--ext/standard/tests/strings/hebrev_variation2.phpt32
-rw-r--r--ext/standard/tests/strings/hebrevc_variation2.phpt44
-rw-r--r--ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt26
-rw-r--r--ext/standard/tests/strings/lcfirst.phptbin6878 -> 6906 bytes
-rw-r--r--ext/standard/tests/strings/money_format_error.phpt12
-rw-r--r--ext/standard/tests/strings/money_format_variation2.phpt20
-rw-r--r--ext/standard/tests/strings/moneyformat.phpt4
-rw-r--r--ext/standard/tests/strings/nl_langinfo_variation1.phpt10
-rw-r--r--ext/standard/tests/strings/printf_basic8.phpt2
-rw-r--r--ext/standard/tests/strings/setlocale_error.phpt14
-rw-r--r--ext/standard/tests/strings/sprintf_basic8.phpt2
-rw-r--r--ext/standard/tests/strings/sprintf_basic8_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/sprintf_variation10.phpt8
-rw-r--r--ext/standard/tests/strings/sprintf_variation19.phpt8
-rw-r--r--ext/standard/tests/strings/sprintf_variation21.phptbin5046 -> 5046 bytes
-rw-r--r--ext/standard/tests/strings/sprintf_variation28.phpt6
-rw-r--r--ext/standard/tests/strings/sprintf_variation28_64bit.phpt6
-rw-r--r--ext/standard/tests/strings/sprintf_variation3.phpt8
-rw-r--r--ext/standard/tests/strings/sprintf_variation34.phpt2
-rw-r--r--ext/standard/tests/strings/sprintf_variation34_64bit.phpt6
-rw-r--r--ext/standard/tests/strings/sprintf_variation40.phpt6
-rw-r--r--ext/standard/tests/strings/sprintf_variation40_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/sprintf_variation46.phpt8
-rw-r--r--ext/standard/tests/strings/str_pad.phptbin9818 -> 9818 bytes
-rw-r--r--ext/standard/tests/strings/str_pad_variation2.phpt10
-rw-r--r--ext/standard/tests/strings/str_pad_variation4.phpt18
-rw-r--r--ext/standard/tests/strings/str_pad_variation5.phpt4
-rw-r--r--ext/standard/tests/strings/str_repeat.phptbin16786 -> 17017 bytes
-rw-r--r--ext/standard/tests/strings/str_replace_array_refs.phpt17
-rw-r--r--ext/standard/tests/strings/str_replace_array_refs2.phpt27
-rw-r--r--ext/standard/tests/strings/str_split_variation2.phpt26
-rw-r--r--ext/standard/tests/strings/str_split_variation2_64bit.phpt22
-rw-r--r--ext/standard/tests/strings/str_split_variation6.phpt4
-rw-r--r--ext/standard/tests/strings/str_split_variation7.phpt4
-rw-r--r--ext/standard/tests/strings/str_word_count.phpt4
-rw-r--r--ext/standard/tests/strings/strcspn_variation3.phpt44
-rw-r--r--ext/standard/tests/strings/strcspn_variation4.phpt26
-rw-r--r--ext/standard/tests/strings/stripos_variation14.phpt20
-rw-r--r--ext/standard/tests/strings/stripos_variation15.phpt8
-rw-r--r--ext/standard/tests/strings/strlen.phptbin7091 -> 7099 bytes
-rw-r--r--ext/standard/tests/strings/strnatcasecmp_variation1.phpt4
-rw-r--r--ext/standard/tests/strings/strncasecmp_variation5.phpt20
-rw-r--r--ext/standard/tests/strings/strncasecmp_variation6.phpt4
-rw-r--r--ext/standard/tests/strings/strncmp_variation5.phpt20
-rw-r--r--ext/standard/tests/strings/strncmp_variation6.phpt4
-rw-r--r--ext/standard/tests/strings/strpos.phptbin9982 -> 9999 bytes
-rw-r--r--ext/standard/tests/strings/strrev_variation1.phptbin2941 -> 2942 bytes
-rw-r--r--ext/standard/tests/strings/strripos.phpt4
-rw-r--r--ext/standard/tests/strings/strripos_offset.phpt10
-rw-r--r--ext/standard/tests/strings/strrpos_negative_offset.phpt35
-rw-r--r--ext/standard/tests/strings/strrpos_offset.phpt10
-rw-r--r--ext/standard/tests/strings/strrpos_variation14.phpt22
-rw-r--r--ext/standard/tests/strings/strrpos_variation15.phpt10
-rw-r--r--ext/standard/tests/strings/strspn_variation3.phpt44
-rw-r--r--ext/standard/tests/strings/strspn_variation4.phpt22
-rw-r--r--ext/standard/tests/strings/strstr.phptbin10531 -> 10539 bytes
-rw-r--r--ext/standard/tests/strings/strtr_with_reference.phpt12
-rw-r--r--ext/standard/tests/strings/substr.phptbin4770 -> 4782 bytes
-rw-r--r--ext/standard/tests/strings/substr_compare.phpt4
-rw-r--r--ext/standard/tests/strings/substr_count_error.phpt2
-rw-r--r--ext/standard/tests/strings/substr_count_variation_001.phpt6
-rw-r--r--ext/standard/tests/strings/substr_replace_error.phpt10
-rw-r--r--ext/standard/tests/strings/ucfirst.phptbin6106 -> 6130 bytes
-rw-r--r--ext/standard/tests/strings/ucwords_variation4.phpt2
-rw-r--r--ext/standard/tests/strings/unpack_bug68225.phpt39
-rw-r--r--ext/standard/tests/strings/vfprintf_basic8.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation11.phpt6
-rw-r--r--ext/standard/tests/strings/vfprintf_variation11_64bit.phpt6
-rw-r--r--ext/standard/tests/strings/vfprintf_variation13.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation13_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation19.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation19_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation3.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation5.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation9.phptbin1872 -> 1870 bytes
-rw-r--r--ext/standard/tests/strings/vprintf_basic8.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation11.phpt6
-rw-r--r--ext/standard/tests/strings/vprintf_variation11_64bit.phpt6
-rw-r--r--ext/standard/tests/strings/vprintf_variation13.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation13_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation19.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation19_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation3.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation5.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation9.phptbin1698 -> 1696 bytes
-rw-r--r--ext/standard/tests/strings/vsprintf_basic8.phpt2
-rw-r--r--ext/standard/tests/strings/vsprintf_variation11.phpt6
-rw-r--r--ext/standard/tests/strings/vsprintf_variation11_64bit.phpt6
-rw-r--r--ext/standard/tests/strings/vsprintf_variation13.phpt2
-rw-r--r--ext/standard/tests/strings/vsprintf_variation13_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vsprintf_variation19.phpt2
-rw-r--r--ext/standard/tests/strings/vsprintf_variation19_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vsprintf_variation3.phpt2
-rw-r--r--ext/standard/tests/strings/vsprintf_variation5.phpt2
-rw-r--r--ext/standard/tests/strings/vsprintf_variation9.phptbin1709 -> 1707 bytes
-rw-r--r--ext/standard/tests/strings/wordwrap_variation2.phpt88
137 files changed, 1016 insertions, 517 deletions
diff --git a/ext/standard/tests/strings/addslashes_variation2.phpt b/ext/standard/tests/strings/addslashes_variation2.phpt
index 49009e8108..792c2c30b6 100644
--- a/ext/standard/tests/strings/addslashes_variation2.phpt
+++ b/ext/standard/tests/strings/addslashes_variation2.phpt
@@ -186,7 +186,7 @@ string(18) "!@#$%&*@$%#&/;:,<>"
string(12) "hello\0world"
-- Iteration 33 --
-string(73) "This is line 1 of \'heredoc\' string
+string(7%d) "This is line 1 of \'heredoc\' string
This is line 2 of \"heredoc\" string"
-- Iteration 34 --
diff --git a/ext/standard/tests/strings/basename_invalid_path.phpt b/ext/standard/tests/strings/basename_invalid_path.phpt
new file mode 100644
index 0000000000..b632efa845
--- /dev/null
+++ b/ext/standard/tests/strings/basename_invalid_path.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Test basename() function : usage variations with invalid paths
+--SKIPIF--
+<?php
+if((substr(PHP_OS, 0, 3) == "WIN"))
+ die('skip not for Windows"');
+?>
+--FILE--
+<?php
+/* Prototype: string basename ( string $path [, string $suffix] );
+ Description: Given a string containing a path to a file,
+ this function will return the base name of the file.
+ If the filename ends in suffix this will also be cut off.
+*/
+
+var_dump(basename(chr(-1)));
+
+echo "Done\n";
+
+--EXPECTF--
+string(0) ""
+Done
diff --git a/ext/standard/tests/strings/basename_invalid_path_win.phpt b/ext/standard/tests/strings/basename_invalid_path_win.phpt
new file mode 100644
index 0000000000..587f2b114c
--- /dev/null
+++ b/ext/standard/tests/strings/basename_invalid_path_win.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Test basename() function : usage variations with invalid paths
+--SKIPIF--
+<?php
+if((substr(PHP_OS, 0, 3) != "WIN"))
+ die('skip Run only on Windows"');
+?>
+--FILE--
+<?php
+/* Prototype: string basename ( string $path [, string $suffix] );
+ Description: Given a string containing a path to a file,
+ this function will return the base name of the file.
+ If the filename ends in suffix this will also be cut off.
+*/
+
+var_dump(basename("\377"));
+
+echo "Done\n";
+
+--EXPECTF--
+string(1) "%c"
+Done
diff --git a/ext/standard/tests/strings/basename_variation.phpt b/ext/standard/tests/strings/basename_variation.phpt
index 2d74a389ab..1efd8c701a 100644
--- a/ext/standard/tests/strings/basename_variation.phpt
+++ b/ext/standard/tests/strings/basename_variation.phpt
@@ -66,7 +66,7 @@ $file_path_variations = array (
/* empty paths */
array(""),
array(''),
- array(NULL)
+ array(NULL),
);
function check_basename( $path_arrays ) {
diff --git a/ext/standard/tests/strings/bug21453.phpt b/ext/standard/tests/strings/bug21453.phpt
index 40d89dd1b4..61547c48f3 100644
--- a/ext/standard/tests/strings/bug21453.phpt
+++ b/ext/standard/tests/strings/bug21453.phpt
@@ -10,8 +10,8 @@ $test = "
var_dump(strip_tags($test));
?>
---EXPECT--
-string(80) "
+--EXPECTF--
+string(8%d) "
first cell before < first cell after
second cell before < second cell after
diff --git a/ext/standard/tests/strings/bug54322.phpt b/ext/standard/tests/strings/bug54322.phpt
index aead172b82..4623a9a2ad 100644
--- a/ext/standard/tests/strings/bug54322.phpt
+++ b/ext/standard/tests/strings/bug54322.phpt
@@ -5,5 +5,6 @@ Bug #54322: Null pointer deref in get_html_translation_table due to information
var_dump(
get_html_translation_table(NAN, 0, "UTF-8") > 0
);
---EXPECT--
-bool(true)
+--EXPECTF--
+Warning: get_html_translation_table() expects parameter 1 to be integer, float given in %s on line %d
+bool(false)
diff --git a/ext/standard/tests/strings/bug55451.phpt b/ext/standard/tests/strings/bug55451.phpt
new file mode 100644
index 0000000000..4759965094
--- /dev/null
+++ b/ext/standard/tests/strings/bug55451.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #55451 (substr_compare with NULL as default length)
+--FILE--
+<?php
+var_dump(substr_compare("abcde", "ABCD", 0, NULL, false) != 0);
+var_dump(substr_compare("abcde", "ABCD", 0, NULL, true) != 0);
+var_dump(substr_compare("abcde", "ABCDE", 0, NULL, false) != 0);
+var_dump(substr_compare("abcde", "ABCDE", 0, NULL, true) == 0);
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+bool(true)
diff --git a/ext/standard/tests/strings/bug55871.phpt b/ext/standard/tests/strings/bug55871.phpt
index 7b743fdfc1..249d1bd3a3 100644
--- a/ext/standard/tests/strings/bug55871.phpt
+++ b/ext/standard/tests/strings/bug55871.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #55871 (Interruption in substr_replace())
+Bug #55871 (Interruption in substr_replace()) (PHP7)
--FILE--
<?php
class test1 {
@@ -25,23 +25,29 @@ class test3 {
$my_var = str_repeat('A', 40);
$out = substr_replace(array(&$my_var), array(new test1), 40, 0);
-var_dump($out);
+var_dump($out, $my_var);
$my_var = str_repeat('A', 40);
$out = substr_replace(array(&$my_var), array(new test2), 40, 0);
-var_dump($out);
+var_dump($out, $my_var);
$my_var = str_repeat('A', 40);
$out = substr_replace(array(&$my_var), array(new test3), 40, 0);
-var_dump($out);
+var_dump($out, $my_var);
--EXPECTF--
-
-Warning: substr_replace(): Argument was modified while replacing in %s on line %d
-array(0) {
+array(1) {
+ [0]=>
+ string(40) "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}
-
-Warning: substr_replace(): Argument was modified while replacing in %s on line %d
-array(0) {
+array(1) {
+ [0]=>
+ string(0) ""
}
-
-Warning: substr_replace(): Argument was modified while replacing in %s on line %d
-array(0) {
+array(1) {
+ [0]=>
+ string(40) "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+}
+int(134512640)
+array(1) {
+ [0]=>
+ string(40) "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}
+string(48) "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
diff --git a/ext/standard/tests/strings/bug61116.phpt b/ext/standard/tests/strings/bug61116.phpt
new file mode 100644
index 0000000000..2bd9f2537f
--- /dev/null
+++ b/ext/standard/tests/strings/bug61116.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #61116 (HTML functions use encoding, not charset)
+--FILE--
+<?php
+Reflection::export(new ReflectionFunction('htmlspecialchars'));
+Reflection::export(new ReflectionFunction('get_html_translation_table'));
+?>
+--EXPECT--
+Function [ <internal:standard> function htmlspecialchars ] {
+
+ - Parameters [4] {
+ Parameter #0 [ <required> $string ]
+ Parameter #1 [ <optional> $quote_style ]
+ Parameter #2 [ <optional> $encoding ]
+ Parameter #3 [ <optional> $double_encode ]
+ }
+}
+
+Function [ <internal:standard> function get_html_translation_table ] {
+
+ - Parameters [3] {
+ Parameter #0 [ <optional> $table ]
+ Parameter #1 [ <optional> $quote_style ]
+ Parameter #2 [ <optional> $encoding ]
+ }
+}
+
+
+
diff --git a/ext/standard/tests/strings/bug68636.phpt b/ext/standard/tests/strings/bug68636.phpt
new file mode 100644
index 0000000000..246722c7aa
--- /dev/null
+++ b/ext/standard/tests/strings/bug68636.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #68636 (setlocale no longer returns current value per category).
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip Not valid for windows');
+}
+if (setlocale(LC_ALL, "en_US.UTF8") !== "en_US.UTF8") {
+ die('skip available locales not usable');
+}
+?>
+--FILE--
+<?php
+var_dump(setlocale(LC_TIME, 'en_US.UTF8'));
+var_dump(setlocale(LC_NUMERIC, 'C'));
+var_dump(setlocale(LC_TIME, 0));
+?>
+--EXPECT--
+string(10) "en_US.UTF8"
+string(1) "C"
+string(10) "en_US.UTF8"
diff --git a/ext/standard/tests/strings/bug69144.phpt b/ext/standard/tests/strings/bug69144.phpt
new file mode 100644
index 0000000000..ded915b4c0
--- /dev/null
+++ b/ext/standard/tests/strings/bug69144.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #69144 (strtr not replacing with partly matching replace pairs)
+--FILE--
+<?php
+$tests = array('bar' => '', 'foo' => 'o', 'foobar' => '', 'hello' => 'hello');
+
+foreach ($tests as $input => $expected) {
+ if ($expected !== ($actual = strtr($input, array("fo" => "", "foobar" => "", "bar" => "")))) {
+ echo "KO `$input` became `$actual` instead of `$expected`\n";
+ }
+}
+echo "okey";
+?>
+--EXPECT--
+okey
diff --git a/ext/standard/tests/strings/bug70436.phpt b/ext/standard/tests/strings/bug70436.phpt
index c62e468726..1273ee30c6 100644
--- a/ext/standard/tests/strings/bug70436.phpt
+++ b/ext/standard/tests/strings/bug70436.phpt
@@ -49,17 +49,7 @@ DONE
Notice: unserialize(): Error at offset 0 of 3 bytes in %sbug70436.php on line %d
Notice: unserialize(): Error at offset 17 of 17 bytes in %sbug70436.php on line %d
-array(4) {
- [0]=>
- int(1)
- [1]=>
- object(obj)#%d (1) {
- ["data"]=>
- bool(false)
- }
- [2]=>
- string(24) "%s"
- [3]=>
- bool(false)
-}
-DONE \ No newline at end of file
+
+Notice: unserialize(): Error at offset 93 of 94 bytes in %sbug70436.php on line %d
+bool(false)
+DONE
diff --git a/ext/standard/tests/strings/bug70487.phpt b/ext/standard/tests/strings/bug70487.phpt
new file mode 100644
index 0000000000..e4ca1ff0b4
--- /dev/null
+++ b/ext/standard/tests/strings/bug70487.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #70487: pack('x') produces an error
+--FILE--
+<?php
+
+var_dump(pack('x') === "\0");
+
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/standard/tests/strings/bug70667.phpt b/ext/standard/tests/strings/bug70667.phpt
new file mode 100644
index 0000000000..fd3deadb29
--- /dev/null
+++ b/ext/standard/tests/strings/bug70667.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Bug #70667 (strtr() causes invalid writes and a crashes)
+--FILE--
+<?php
+$a = array("{{language_id}}"=>"255", "{{partner_name}}"=>"test1");
+var_dump(strtr("Sign in to test1", $a));
+?>
+--EXPECT--
+string(16) "Sign in to test1"
diff --git a/ext/standard/tests/strings/bug71188.phpt b/ext/standard/tests/strings/bug71188.phpt
new file mode 100644
index 0000000000..10738253c4
--- /dev/null
+++ b/ext/standard/tests/strings/bug71188.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #71188 (str_replace converts integers in original $search array to strings)
+--FILE--
+<?php
+$a = [0, 1, 2];
+$b = ["Nula", "Jedna", "Dva"];
+
+var_dump($a);
+str_replace($a, $b, "1");
+var_dump($a);
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+array(3) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
diff --git a/ext/standard/tests/strings/bug71190.phpt b/ext/standard/tests/strings/bug71190.phpt
new file mode 100644
index 0000000000..feabe7c172
--- /dev/null
+++ b/ext/standard/tests/strings/bug71190.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #71190 (substr_replace converts integers in original $search array to strings)
+--FILE--
+<?php
+$b = [0, 1, 2];
+
+var_dump($b);
+substr_replace("test", $b, "1");
+var_dump($b);
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+array(3) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
diff --git a/ext/standard/tests/strings/bug71806.dat b/ext/standard/tests/strings/bug71806.dat
new file mode 100644
index 0000000000..c999da61c2
--- /dev/null
+++ b/ext/standard/tests/strings/bug71806.dat
@@ -0,0 +1,3 @@
+<?php
+/* comment */
+echo 098 ;
diff --git a/ext/standard/tests/strings/bug71806.phpt b/ext/standard/tests/strings/bug71806.phpt
new file mode 100644
index 0000000000..6eb534d0a0
--- /dev/null
+++ b/ext/standard/tests/strings/bug71806.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #71806 (php_strip_whitespace() fails on some numerical values)
+--FILE--
+<?php
+
+echo php_strip_whitespace(__DIR__ . '/bug71806.dat');
+
+?>
+--EXPECT--
+<?php
+ echo 098 ;
diff --git a/ext/standard/tests/strings/bug71969.phpt b/ext/standard/tests/strings/bug71969.phpt
new file mode 100644
index 0000000000..aafceb09ad
--- /dev/null
+++ b/ext/standard/tests/strings/bug71969.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #71969 (str_replace returns an incorrect resulting array after a foreach by reference)
+--FILE--
+<?php
+$a = array(
+ array("one" => array("a"=>"0000", "b"=>"1111")),
+);
+
+//foreach by reference, changing the array value
+foreach($a as &$record)
+{
+ $record["one"]["a"] = "2222";
+}
+var_dump(str_replace("2", "3", $a));
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ array(1) {
+ ["one"]=>
+ array(2) {
+ ["a"]=>
+ string(4) "2222"
+ ["b"]=>
+ string(4) "1111"
+ }
+ }
+}
diff --git a/ext/standard/tests/strings/bug72100.phpt b/ext/standard/tests/strings/bug72100.phpt
new file mode 100644
index 0000000000..7fcc0831b6
--- /dev/null
+++ b/ext/standard/tests/strings/bug72100.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test implode() function, problems with big numbers
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+var_dump( implode(" ", ["hello long", 999999999999999999, PHP_INT_MAX]));
+var_dump( implode(" ", ["hello negative long", -999999999999999999, PHP_INT_MIN] ) );
+var_dump( implode(" ", ["hello small long", -101, -100, -99, -90, -11, -10, -9, -1, 0, 1, 2, 9, 10, 11, 90, 99, 100, 101] ) );
+echo "Done\n";
+?>
+--EXPECT--
+string(49) "hello long 999999999999999999 9223372036854775807"
+string(60) "hello negative long -999999999999999999 -9223372036854775808"
+string(76) "hello small long -101 -100 -99 -90 -11 -10 -9 -1 0 1 2 9 10 11 90 99 100 101"
+Done
diff --git a/ext/standard/tests/strings/bug72152.phpt b/ext/standard/tests/strings/bug72152.phpt
new file mode 100644
index 0000000000..440a90e057
--- /dev/null
+++ b/ext/standard/tests/strings/bug72152.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #72152 (base64_decode $strict fails to detect null byte)
+--FILE--
+<?php
+var_dump(base64_decode("\x00", true));
+var_dump(base64_decode("\x00VVVV", true));
+var_dump(base64_decode("VVVV\x00", true));
+--EXPECT--
+bool(false)
+bool(false)
+bool(false)
diff --git a/ext/standard/tests/strings/bug72263.phpt b/ext/standard/tests/strings/bug72263.phpt
new file mode 100644
index 0000000000..d827af21ce
--- /dev/null
+++ b/ext/standard/tests/strings/bug72263.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #72263 (base64_decode skips a character after padding in strict mode)
+--FILE--
+<?php
+var_dump(base64_decode("*", true));
+var_dump(base64_decode("=*", true));
+var_dump(base64_decode("VVV=", true));
+var_dump(base64_decode("VVV=*", true));
+--EXPECT--
+bool(false)
+bool(false)
+string(2) "UU"
+bool(false)
diff --git a/ext/standard/tests/strings/bug72264.phpt b/ext/standard/tests/strings/bug72264.phpt
new file mode 100644
index 0000000000..67dc0e9e5c
--- /dev/null
+++ b/ext/standard/tests/strings/bug72264.phpt
@@ -0,0 +1,7 @@
+--TEST--
+Bug #72264 (base64_decode $strict fails with whitespace between padding)
+--FILE--
+<?php
+var_dump(base64_decode("VV= =", true));
+--EXPECT--
+string(1) "U"
diff --git a/ext/standard/tests/strings/bug72433.phpt b/ext/standard/tests/strings/bug72433.phpt
index 3a2c89701b..d5a6612f2b 100644
--- a/ext/standard/tests/strings/bug72433.phpt
+++ b/ext/standard/tests/strings/bug72433.phpt
@@ -21,12 +21,39 @@ var_dump($free_me);
--EXPECTF--
array(3) {
[0]=>
- *RECURSION*
+ array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ object(ArrayObject)#%d (1) {
+ ["storage":"ArrayObject":private]=>
+ *RECURSION*
+ }
+ }
[1]=>
- *RECURSION*
+ array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ object(ArrayObject)#%d (1) {
+ ["storage":"ArrayObject":private]=>
+ *RECURSION*
+ }
+ }
[2]=>
object(ArrayObject)#%d (1) {
["storage":"ArrayObject":private]=>
- *RECURSION*
+ array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
}
}
diff --git a/ext/standard/tests/strings/bug72434.phpt b/ext/standard/tests/strings/bug72434.phpt
index 1408b8f578..fa31c8bf03 100644
--- a/ext/standard/tests/strings/bug72434.phpt
+++ b/ext/standard/tests/strings/bug72434.phpt
@@ -26,8 +26,8 @@ $fill_freed_space_4 = "filler_zval_4";
debug_zval_dump($unserialized_payload[1]);
?>
--EXPECTF--
-array(1) refcount(1){
+array(1) refcount(3){
[0]=>
- object(stdClass)#%d (0) refcount(3){
+ object(stdClass)#%d (0) refcount(1){
}
}
diff --git a/ext/standard/tests/strings/bug72663.phpt b/ext/standard/tests/strings/bug72663.phpt
index e61f939d4d..ec16e069ff 100644
--- a/ext/standard/tests/strings/bug72663.phpt
+++ b/ext/standard/tests/strings/bug72663.phpt
@@ -23,4 +23,6 @@ DONE
Notice: unserialize(): Unexpected end of serialized data in %sbug72663.php on line %d
Notice: unserialize(): Error at offset 46 of 47 bytes in %sbug72663.php on line %d
-DONE \ No newline at end of file
+
+Notice: unserialize(): Error at offset 79 of 80 bytes in %sbug72663.php on line %d
+DONE
diff --git a/ext/standard/tests/strings/bug72663_2.phpt b/ext/standard/tests/strings/bug72663_2.phpt
index ac605e9fd2..729694be53 100644
--- a/ext/standard/tests/strings/bug72663_2.phpt
+++ b/ext/standard/tests/strings/bug72663_2.phpt
@@ -1,5 +1,11 @@
--TEST--
Bug #72663: Create an Unexpected Object and Don't Invoke __wakeup() in Deserialization
+--SKIPIF--
+<?php
+if (!extension_loaded("session")) {
+ die("skip");
+}
+?>
--FILE--
<?php
@@ -14,4 +20,4 @@ DONE
Notice: session_decode(): Unexpected end of serialized data in %sbug72663_2.php on line %d
array(0) {
}
-DONE \ No newline at end of file
+DONE
diff --git a/ext/standard/tests/strings/bug72703.phpt b/ext/standard/tests/strings/bug72703.phpt
deleted file mode 100644
index 5e3bf4875d..0000000000
--- a/ext/standard/tests/strings/bug72703.phpt
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-Bug #72703 Out of bounds global memory read in BF_crypt triggered by password_verify
---SKIPIF--
-<?php
-if (!function_exists('crypt'))) {
- die("SKIP crypt() is not available");
-}
-?>
---FILE--
-<?php
- var_dump(password_verify("","$2y$10$$"));
-?>
-==OK==
---EXPECT--
-bool(false)
-==OK==
-
diff --git a/ext/standard/tests/strings/chunk_split_variation2.phpt b/ext/standard/tests/strings/chunk_split_variation2.phpt
index d49ec3b1bd..9240ed3ea0 100644
--- a/ext/standard/tests/strings/chunk_split_variation2.phpt
+++ b/ext/standard/tests/strings/chunk_split_variation2.phpt
@@ -1,5 +1,7 @@
--TEST--
Test chunk_split() function : usage variations - unexpected values for 'chunklen' argument(Bug#42796)
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
--FILE--
<?php
/* Prototype : string chunk_split(string $str [, int $chunklen [, string $ending]])
@@ -98,8 +100,8 @@ Warning: chunk_split(): Chunk length should be greater than zero in %schunk_spli
bool(false)
-- Iteration 3 --
-Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
-bool(false)
+Warning: chunk_split() expects parameter 2 to be integer, float given in %s on line %d
+NULL
-- Iteration 4 --
Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
@@ -110,23 +112,23 @@ Warning: chunk_split(): Chunk length should be greater than zero in %schunk_spli
bool(false)
-- Iteration 6 --
-Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
+Warning: chunk_split() expects parameter 2 to be integer, array given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 7 --
-Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
+Warning: chunk_split() expects parameter 2 to be integer, array given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 8 --
-Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
+Warning: chunk_split() expects parameter 2 to be integer, array given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 9 --
-Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
+Warning: chunk_split() expects parameter 2 to be integer, array given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 10 --
-Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
+Warning: chunk_split() expects parameter 2 to be integer, array given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 11 --
@@ -150,23 +152,23 @@ Warning: chunk_split(): Chunk length should be greater than zero in %schunk_spli
bool(false)
-- Iteration 17 --
-Warning: chunk_split() expects parameter 2 to be long, string given in %schunk_split_variation2.php on line %d
+Warning: chunk_split() expects parameter 2 to be integer, string given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 18 --
-Warning: chunk_split() expects parameter 2 to be long, string given in %schunk_split_variation2.php on line %d
+Warning: chunk_split() expects parameter 2 to be integer, string given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 19 --
-Warning: chunk_split() expects parameter 2 to be long, string given in %schunk_split_variation2.php on line %d
+Warning: chunk_split() expects parameter 2 to be integer, string given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 20 --
-Warning: chunk_split() expects parameter 2 to be long, string given in %schunk_split_variation2.php on line %d
+Warning: chunk_split() expects parameter 2 to be integer, string given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 21 --
-Warning: chunk_split() expects parameter 2 to be long, object given in %schunk_split_variation2.php on line %d
+Warning: chunk_split() expects parameter 2 to be integer, object given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 22 --
@@ -178,6 +180,6 @@ Warning: chunk_split(): Chunk length should be greater than zero in %schunk_spli
bool(false)
-- Iteration 24 --
-Warning: chunk_split() expects parameter 2 to be long, resource given in %schunk_split_variation2.php on line %d
+Warning: chunk_split() expects parameter 2 to be integer, resource given in %schunk_split_variation2.php on line %d
NULL
===DONE===
diff --git a/ext/standard/tests/strings/chunk_split_variation5.phpt b/ext/standard/tests/strings/chunk_split_variation5.phpt
index 580f8f0a6f..e53b1e3240 100644
--- a/ext/standard/tests/strings/chunk_split_variation5.phpt
+++ b/ext/standard/tests/strings/chunk_split_variation5.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/chunk_split_variation8.phpt b/ext/standard/tests/strings/chunk_split_variation8.phpt
index cfb440e923..3dfa33a2eb 100644
--- a/ext/standard/tests/strings/chunk_split_variation8.phpt
+++ b/ext/standard/tests/strings/chunk_split_variation8.phpt
@@ -83,8 +83,8 @@ It has _speci@l ch@r$ 2222 !!!Now \k as escape char to test
chunk_split():::"
-- Iteration 7 --
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
+Warning: chunk_split() expects parameter 2 to be integer, float given in %s on line %d
+NULL
-- Iteration 8 --
Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
diff --git a/ext/standard/tests/strings/count_chars_variation2.phpt b/ext/standard/tests/strings/count_chars_variation2.phpt
index 7a17cb9c61..7896ff1d73 100644
--- a/ext/standard/tests/strings/count_chars_variation2.phpt
+++ b/ext/standard/tests/strings/count_chars_variation2.phpt
@@ -1,5 +1,7 @@
--TEST--
Test count_chars() function : usage variations - test values for $mode argument
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
--FILE--
<?php
@@ -115,11 +117,11 @@ Warning: count_chars(): Unknown mode in %s on line %d
bool(false)
-- Iteration 11 --
-Warning: count_chars() expects parameter 2 to be long, array given in %s on line %d
+Warning: count_chars() expects parameter 2 to be integer, array given in %s on line %d
bool(false)
-- Iteration 12 --
-Warning: count_chars() expects parameter 2 to be long, array given in %s on line %d
+Warning: count_chars() expects parameter 2 to be integer, array given in %s on line %d
bool(false)
-- Iteration 13 --
bool(true)
@@ -135,11 +137,11 @@ bool(true)
bool(true)
-- Iteration 19 --
-Warning: count_chars() expects parameter 2 to be long, string given in %s on line %d
+Warning: count_chars() expects parameter 2 to be integer, string given in %s on line %d
bool(false)
-- Iteration 20 --
-Warning: count_chars() expects parameter 2 to be long, string given in %s on line %d
+Warning: count_chars() expects parameter 2 to be integer, string given in %s on line %d
bool(false)
-- Iteration 21 --
@@ -153,7 +155,7 @@ Warning: count_chars(): Unknown mode in %s on line %d
bool(false)
-- Iteration 23 --
-Warning: count_chars() expects parameter 2 to be long, object given in %s on line %d
+Warning: count_chars() expects parameter 2 to be integer, object given in %s on line %d
bool(false)
-- Iteration 24 --
bool(true)
diff --git a/ext/standard/tests/strings/crypt_blowfish_variation2.phpt b/ext/standard/tests/strings/crypt_blowfish_variation2.phpt
index 21bedc10c6..9db9e21424 100644
--- a/ext/standard/tests/strings/crypt_blowfish_variation2.phpt
+++ b/ext/standard/tests/strings/crypt_blowfish_variation2.phpt
@@ -1,10 +1,10 @@
--TEST--
-Test Blowfish crypt() falls back to DES when rounds are not specified,
+Test Blowfish crypt() does not fall back to DES when rounds are not specified,
or Blowfish is not available.
--FILE--
<?php
$crypt = crypt(b'U*U', b'$2a$CCCCCCCCCCCCCCCCCCCCC.E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW');
-if ($crypt===b'$2SHYF.wPGyfE') {
+if ($crypt==='*0') {
echo "OK\n";
} else {
echo "Not OK\n";
diff --git a/ext/standard/tests/strings/dirname_error.phpt b/ext/standard/tests/strings/dirname_error.phpt
index bf6310283b..303a59b2d5 100644
--- a/ext/standard/tests/strings/dirname_error.phpt
+++ b/ext/standard/tests/strings/dirname_error.phpt
@@ -9,17 +9,23 @@ echo "*** Testing error conditions ***\n";
// zero arguments
var_dump( dirname() );
+// Bad arg
+var_dump( dirname("/var/tmp/bar.gz", 0) );
+
// more than expected no. of arguments
-var_dump( dirname("/var/tmp/bar.gz", ".gz") );
+var_dump( dirname("/var/tmp/bar.gz", 1, ".gz") );
echo "Done\n";
?>
--EXPECTF--
*** Testing error conditions ***
-Warning: dirname() expects exactly 1 parameter, 0 given in %s on line %d
+Warning: dirname() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: dirname(): Invalid argument, levels must be >= 1 in %s on line %d
NULL
-Warning: dirname() expects exactly 1 parameter, 2 given in %s on line %d
+Warning: dirname() expects at most 2 parameters, 3 given in %s on line %d
NULL
Done
diff --git a/ext/standard/tests/strings/dirname_multi.phpt b/ext/standard/tests/strings/dirname_multi.phpt
new file mode 100644
index 0000000000..febbd0c293
--- /dev/null
+++ b/ext/standard/tests/strings/dirname_multi.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test dirname() function : usage variations
+--SKIPIF--
+<?php
+if((substr(PHP_OS, 0, 3) == "WIN"))
+ die('skip not for Windows');
+?>
+--FILE--
+<?php
+/* Prototype: string dirname ( string $path [, int nb]);
+ Description: Returns directory name component of path.
+*/
+for ($i=0 ; $i<5 ; $i++) {
+ var_dump(dirname("/foo/bar/baz", $i));
+}
+var_dump(dirname("/foo/bar/baz", PHP_INT_MAX));
+?>
+Done
+--EXPECTF--
+Warning: dirname(): Invalid argument, levels must be >= 1 in %sdirname_multi.php on line %d
+NULL
+string(8) "/foo/bar"
+string(4) "/foo"
+string(1) "/"
+string(1) "/"
+string(1) "/"
+Done
diff --git a/ext/standard/tests/strings/dirname_multi_win.phpt b/ext/standard/tests/strings/dirname_multi_win.phpt
new file mode 100644
index 0000000000..4fed5895e6
--- /dev/null
+++ b/ext/standard/tests/strings/dirname_multi_win.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test dirname() function : usage variations
+--SKIPIF--
+<?php
+if((substr(PHP_OS, 0, 3) != "WIN"))
+ die('skip Windows only');
+?>
+--FILE--
+<?php
+/* Prototype: string dirname ( string $path [, int nb]);
+ Description: Returns directory name component of path.
+*/
+for ($i=0 ; $i<5 ; $i++) {
+ var_dump(dirname("/foo/bar/baz", $i));
+}
+var_dump(dirname("/foo/bar/baz", PHP_INT_MAX));
+var_dump(dirname("g:/foo/bar/baz", PHP_INT_MAX));
+var_dump(dirname("g:foo/bar/baz", PHP_INT_MAX));
+?>
+Done
+--EXPECTF--
+Warning: dirname(): Invalid argument, levels must be >= 1 in %sdirname_multi_win.php on line %d
+NULL
+string(8) "/foo/bar"
+string(4) "/foo"
+string(1) "\"
+string(1) "\"
+string(1) "\"
+string(3) "g:\"
+string(3) "g:."
+Done
diff --git a/ext/standard/tests/strings/explode.phpt b/ext/standard/tests/strings/explode.phpt
index 1047fb7856..4c7a3fe45a 100644
--- a/ext/standard/tests/strings/explode.phpt
+++ b/ext/standard/tests/strings/explode.phpt
@@ -2,6 +2,8 @@
explode() function
--INI--
error_reporting=2047
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
--FILE--
<?php
/* From http://bugs.php.net/19865 */
diff --git a/ext/standard/tests/strings/explode_variation3.phpt b/ext/standard/tests/strings/explode_variation3.phpt
index 2e87893107..37574e11a4 100644
--- a/ext/standard/tests/strings/explode_variation3.phpt
+++ b/ext/standard/tests/strings/explode_variation3.phpt
@@ -177,15 +177,15 @@ array(6) {
}
-- Iteration 10 --
-Warning: explode() expects parameter 3 to be long, array given in %s on line %d
+Warning: explode() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration 11 --
-Warning: explode() expects parameter 3 to be long, array given in %s on line %d
+Warning: explode() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration 12 --
-Warning: explode() expects parameter 3 to be long, array given in %s on line %d
+Warning: explode() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration 13 --
array(1) {
@@ -219,11 +219,11 @@ array(1) {
}
-- Iteration 19 --
-Warning: explode() expects parameter 3 to be long, object given in %s on line %d
+Warning: explode() expects parameter 3 to be integer, object given in %s on line %d
NULL
-- Iteration 20 --
-Warning: explode() expects parameter 3 to be long, resource given in %s on line %d
+Warning: explode() expects parameter 3 to be integer, resource given in %s on line %d
NULL
-- Iteration 21 --
array(1) {
diff --git a/ext/standard/tests/strings/get_html_translation_table_basic6.phpt b/ext/standard/tests/strings/get_html_translation_table_basic6.phpt
index a4b2909f23..ad1c5986ab 100644
--- a/ext/standard/tests/strings/get_html_translation_table_basic6.phpt
+++ b/ext/standard/tests/strings/get_html_translation_table_basic6.phpt
@@ -239,11 +239,11 @@ array(5) {
}
-- with table = HTML_SPECIALCHARS, ENT_NOQUOTES --
array(3) {
- [">"]=>
- string(4) "&gt;"
- ["<"]=>
- string(4) "&lt;"
["&"]=>
string(5) "&amp;"
+ ["<"]=>
+ string(4) "&lt;"
+ [">"]=>
+ string(4) "&gt;"
}
Done
diff --git a/ext/standard/tests/strings/get_html_translation_table_variation1.phpt b/ext/standard/tests/strings/get_html_translation_table_variation1.phpt
index 76d590c35b..ec4075b5ec 100644
--- a/ext/standard/tests/strings/get_html_translation_table_variation1.phpt
+++ b/ext/standard/tests/strings/get_html_translation_table_variation1.phpt
@@ -106,38 +106,38 @@ echo "Done\n";
--- Testing get_html_translation_table() by supplying different values for 'table' argument ---
-- Iteration 1 --
-Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, array given in %s on line %d
NULL
-Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, array given in %s on line %d
NULL
-- Iteration 2 --
-Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, array given in %s on line %d
NULL
-Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, array given in %s on line %d
NULL
-- Iteration 3 --
-Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, array given in %s on line %d
NULL
-Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, array given in %s on line %d
NULL
-- Iteration 4 --
-Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, array given in %s on line %d
NULL
-Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, array given in %s on line %d
NULL
-- Iteration 5 --
-Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, array given in %s on line %d
NULL
-Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, array given in %s on line %d
NULL
-- Iteration 6 --
int(252)
@@ -189,38 +189,38 @@ array(4) {
}
-- Iteration 10 --
-Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, string given in %s on line %d
NULL
-Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, string given in %s on line %d
NULL
-- Iteration 11 --
-Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, string given in %s on line %d
NULL
-Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, string given in %s on line %d
NULL
-- Iteration 12 --
-Warning: get_html_translation_table() expects parameter 1 to be long, object given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, object given in %s on line %d
NULL
-Warning: get_html_translation_table() expects parameter 1 to be long, object given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, object given in %s on line %d
NULL
-- Iteration 13 --
-Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, string given in %s on line %d
NULL
-Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, string given in %s on line %d
NULL
-- Iteration 14 --
-Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, string given in %s on line %d
NULL
-Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, string given in %s on line %d
NULL
-- Iteration 15 --
array(4) {
@@ -266,10 +266,10 @@ array(4) {
}
-- Iteration 17 --
-Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, resource given in %s on line %d
NULL
-Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %d
+Warning: get_html_translation_table() expects parameter 1 to be integer, resource given in %s on line %d
NULL
-- Iteration 18 --
array(4) {
diff --git a/ext/standard/tests/strings/get_html_translation_table_variation2.phpt b/ext/standard/tests/strings/get_html_translation_table_variation2.phpt
index ea42af996c..67acf42ff7 100644
--- a/ext/standard/tests/strings/get_html_translation_table_variation2.phpt
+++ b/ext/standard/tests/strings/get_html_translation_table_variation2.phpt
@@ -88,23 +88,23 @@ echo "Done\n";
--- Testing get_html_translation_table() by supplying different values for 'quote_style' argument ---
-- Iteration 1 --
-Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %s
+Warning: get_html_translation_table() expects parameter 2 to be integer, array given in %s on line %s
NULL
-- Iteration 2 --
-Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %s
+Warning: get_html_translation_table() expects parameter 2 to be integer, array given in %s on line %s
NULL
-- Iteration 3 --
-Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %s
+Warning: get_html_translation_table() expects parameter 2 to be integer, array given in %s on line %s
NULL
-- Iteration 4 --
-Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %s
+Warning: get_html_translation_table() expects parameter 2 to be integer, array given in %s on line %s
NULL
-- Iteration 5 --
-Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %s
+Warning: get_html_translation_table() expects parameter 2 to be integer, array given in %s on line %s
NULL
-- Iteration 6 --
array(4) {
@@ -148,23 +148,23 @@ array(3) {
}
-- Iteration 10 --
-Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %s
+Warning: get_html_translation_table() expects parameter 2 to be integer, string given in %s on line %s
NULL
-- Iteration 11 --
-Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %s
+Warning: get_html_translation_table() expects parameter 2 to be integer, string given in %s on line %s
NULL
-- Iteration 12 --
-Warning: get_html_translation_table() expects parameter 2 to be long, object given in %s on line %s
+Warning: get_html_translation_table() expects parameter 2 to be integer, object given in %s on line %s
NULL
-- Iteration 13 --
-Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %s
+Warning: get_html_translation_table() expects parameter 2 to be integer, string given in %s on line %s
NULL
-- Iteration 14 --
-Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %s
+Warning: get_html_translation_table() expects parameter 2 to be integer, string given in %s on line %s
NULL
-- Iteration 15 --
array(3) {
@@ -186,7 +186,7 @@ array(3) {
}
-- Iteration 17 --
-Warning: get_html_translation_table() expects parameter 2 to be long, resource given in %s on line %s
+Warning: get_html_translation_table() expects parameter 2 to be integer, resource given in %s on line %s
NULL
-- Iteration 18 --
array(3) {
diff --git a/ext/standard/tests/strings/hebrev_variation2.phpt b/ext/standard/tests/strings/hebrev_variation2.phpt
index 00ada9abee..5698cde793 100644
--- a/ext/standard/tests/strings/hebrev_variation2.phpt
+++ b/ext/standard/tests/strings/hebrev_variation2.phpt
@@ -180,15 +180,15 @@ string(109) ".The hebrev function converts logical Hebrew text to visual text
"
-- Iteration 10 --
-Warning: hebrev() expects parameter 2 to be long, array given in %s on line %d
+Warning: hebrev() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 11 --
-Warning: hebrev() expects parameter 2 to be long, array given in %s on line %d
+Warning: hebrev() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 12 --
-Warning: hebrev() expects parameter 2 to be long, array given in %s on line %d
+Warning: hebrev() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 13 --
string(109) "xttel uaisv
@@ -230,11 +230,11 @@ string(109) ".The hebrev function converts logical Hebrew text to visual text
"
-- Iteration 19 --
-Warning: hebrev() expects parameter 2 to be long, string given in %s on line %d
+Warning: hebrev() expects parameter 2 to be integer, string given in %s on line %d
NULL
-- Iteration 20 --
-Warning: hebrev() expects parameter 2 to be long, string given in %s on line %d
+Warning: hebrev() expects parameter 2 to be integer, string given in %s on line %d
NULL
-- Iteration 21 --
@@ -259,26 +259,18 @@ string(109) ".The hebrev function converts logical Hebrew text to visual text
.The function tries to avoid breaking words
"
-- Iteration 23 --
-string(109) "textual vis
-to
-textrew Heb
-icallog
-ertsconvion unctf
-brevhe
-.Therds
-wo
-kingbreaoid av
-to
-riest
-tionfuncThe .
+
+Notice: A non well formed numeric value encountered in %s on line %d
+string(109) ".The hebrev function converts logical Hebrew text to visual text
+.The function tries to avoid breaking words
"
-- Iteration 24 --
-Warning: hebrev() expects parameter 2 to be long, object given in %s on line %d
+Warning: hebrev() expects parameter 2 to be integer, object given in %s on line %d
NULL
-- Iteration 25 --
-Warning: hebrev() expects parameter 2 to be long, resource given in %s on line %d
+Warning: hebrev() expects parameter 2 to be integer, resource given in %s on line %d
NULL
-- Iteration 26 --
string(109) ".The hebrev function converts logical Hebrew text to visual text
@@ -288,4 +280,4 @@ string(109) ".The hebrev function converts logical Hebrew text to visual text
string(109) ".The hebrev function converts logical Hebrew text to visual text
.The function tries to avoid breaking words
"
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/standard/tests/strings/hebrevc_variation2.phpt b/ext/standard/tests/strings/hebrevc_variation2.phpt
index 924af9a279..e6a6013931 100644
--- a/ext/standard/tests/strings/hebrevc_variation2.phpt
+++ b/ext/standard/tests/strings/hebrevc_variation2.phpt
@@ -254,15 +254,15 @@ string(241) ".The hebrevcc function converts logical Hebrew text to visual text<
"
-- Iteration 10 --
-Warning: hebrevc() expects parameter 2 to be long, array given in %s on line %d
+Warning: hebrevc() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 11 --
-Warning: hebrevc() expects parameter 2 to be long, array given in %s on line %d
+Warning: hebrevc() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 12 --
-Warning: hebrevc() expects parameter 2 to be long, array given in %s on line %d
+Warning: hebrevc() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 13 --
string(331) "xttel uaisv<br />
@@ -338,11 +338,11 @@ string(241) ".The hebrevcc function converts logical Hebrew text to visual text<
"
-- Iteration 19 --
-Warning: hebrevc() expects parameter 2 to be long, string given in %s on line %d
+Warning: hebrevc() expects parameter 2 to be integer, string given in %s on line %d
NULL
-- Iteration 20 --
-Warning: hebrevc() expects parameter 2 to be long, string given in %s on line %d
+Warning: hebrevc() expects parameter 2 to be integer, string given in %s on line %d
NULL
-- Iteration 21 --
@@ -381,37 +381,21 @@ string(241) ".The hebrevcc function converts logical Hebrew text to visual text<
.The function tries to avoid breaking words<br />
"
-- Iteration 23 --
-string(349) "textual vis<br />
-to<br />
-textrew Heb<br />
-icallog<br />
-ertsconvion unctf<br />
-evcchebrThe .<br />
-inesnewlrts onvec<br />
-it<br />
-thatnce feredif<br />
-the<br />
-withc() brevhe<br />
-to<br />
-ilarsim<br />
-is<br />
-tionfunchis ) T<br />
-(<br />
-'<br<to .'<br />
-<br />
-ordsw<br />
-kingbreaoid av<br />
-to<br />
-riest<br />
-tionfuncThe .<br />
+
+Notice: A non well formed numeric value encountered in %s on line %d
+string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
+) This function is similar to hebrevc() with the difference that it converts newlines<br />
+<to '<br (<br />
+.'<br />
+.The function tries to avoid breaking words<br />
"
-- Iteration 24 --
-Warning: hebrevc() expects parameter 2 to be long, object given in %s on line %d
+Warning: hebrevc() expects parameter 2 to be integer, object given in %s on line %d
NULL
-- Iteration 25 --
-Warning: hebrevc() expects parameter 2 to be long, resource given in %s on line %d
+Warning: hebrevc() expects parameter 2 to be integer, resource given in %s on line %d
NULL
-- Iteration 26 --
string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
diff --git a/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt b/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt
index 0e26d094a8..837583c224 100644
--- a/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt
+++ b/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt
@@ -102,7 +102,9 @@ string(104) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 =
string(104) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. " double quote string "</html>"
-- Iteration 3 --
-string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
+
+Warning: htmlspecialchars_decode() expects parameter 2 to be integer, float given in %s on line %d
+NULL
-- Iteration 4 --
string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
@@ -112,27 +114,27 @@ string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 =
-- Iteration 6 --
-Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %shtmlspecialchars_decode_variation2.php on line %d
+Warning: htmlspecialchars_decode() expects parameter 2 to be integer, array given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
-- Iteration 7 --
-Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %shtmlspecialchars_decode_variation2.php on line %d
+Warning: htmlspecialchars_decode() expects parameter 2 to be integer, array given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
-- Iteration 8 --
-Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %shtmlspecialchars_decode_variation2.php on line %d
+Warning: htmlspecialchars_decode() expects parameter 2 to be integer, array given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
-- Iteration 9 --
-Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %shtmlspecialchars_decode_variation2.php on line %d
+Warning: htmlspecialchars_decode() expects parameter 2 to be integer, array given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
-- Iteration 10 --
-Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %shtmlspecialchars_decode_variation2.php on line %d
+Warning: htmlspecialchars_decode() expects parameter 2 to be integer, array given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
-- Iteration 11 --
@@ -155,27 +157,27 @@ string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 =
-- Iteration 17 --
-Warning: htmlspecialchars_decode() expects parameter 2 to be long, string given in %shtmlspecialchars_decode_variation2.php on line %d
+Warning: htmlspecialchars_decode() expects parameter 2 to be integer, string given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
-- Iteration 18 --
-Warning: htmlspecialchars_decode() expects parameter 2 to be long, string given in %shtmlspecialchars_decode_variation2.php on line %d
+Warning: htmlspecialchars_decode() expects parameter 2 to be integer, string given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
-- Iteration 19 --
-Warning: htmlspecialchars_decode() expects parameter 2 to be long, string given in %shtmlspecialchars_decode_variation2.php on line %d
+Warning: htmlspecialchars_decode() expects parameter 2 to be integer, string given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
-- Iteration 20 --
-Warning: htmlspecialchars_decode() expects parameter 2 to be long, string given in %shtmlspecialchars_decode_variation2.php on line %d
+Warning: htmlspecialchars_decode() expects parameter 2 to be integer, string given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
-- Iteration 21 --
-Warning: htmlspecialchars_decode() expects parameter 2 to be long, object given in %shtmlspecialchars_decode_variation2.php on line %d
+Warning: htmlspecialchars_decode() expects parameter 2 to be integer, object given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
-- Iteration 22 --
@@ -186,6 +188,6 @@ string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 =
-- Iteration 24 --
-Warning: htmlspecialchars_decode() expects parameter 2 to be long, resource given in %shtmlspecialchars_decode_variation2.php on line %d
+Warning: htmlspecialchars_decode() expects parameter 2 to be integer, resource given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
Done
diff --git a/ext/standard/tests/strings/lcfirst.phpt b/ext/standard/tests/strings/lcfirst.phpt
index e603f4bbf8..6cbd213fbe 100644
--- a/ext/standard/tests/strings/lcfirst.phpt
+++ b/ext/standard/tests/strings/lcfirst.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/money_format_error.phpt b/ext/standard/tests/strings/money_format_error.phpt
index cf110b43ab..454b593537 100644
--- a/ext/standard/tests/strings/money_format_error.phpt
+++ b/ext/standard/tests/strings/money_format_error.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test money_format() function : error conditions
+Test money_format() function : error conditions
--SKIPIF--
<?php
if (!function_exists('money_format')) {
@@ -30,9 +30,10 @@ echo "\n-- Testing money_format() function with insufficient arguments --\n";
var_dump( money_format($string) );
echo "\n-- Testing money_format() function with more than expected no. of arguments --\n";
-
var_dump( money_format($string, $value, $extra_arg) );
+echo "\n-- Testing money_format() function with more than one token --\n";
+var_dump( money_format($string . $string, $value) );
?>
===DONE===
--EXPECTF--
@@ -52,4 +53,9 @@ NULL
Warning: money_format() expects exactly 2 parameters, 3 given in %s on line %d
NULL
-===DONE=== \ No newline at end of file
+
+-- Testing money_format() function with more than one token --
+
+Warning: money_format(): Only a single %ci or %cn token can be used in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/strings/money_format_variation2.phpt b/ext/standard/tests/strings/money_format_variation2.phpt
index 8ac4cb9a98..6e01bf03dd 100644
--- a/ext/standard/tests/strings/money_format_variation2.phpt
+++ b/ext/standard/tests/strings/money_format_variation2.phpt
@@ -125,15 +125,15 @@ string
string
-- Iteration 10 --
-Warning: money_format() expects parameter 2 to be double, array given in %s on line %d
+Warning: money_format() expects parameter 2 to be float, array given in %s on line %d
NULL
-- Iteration 11 --
-Warning: money_format() expects parameter 2 to be double, array given in %s on line %d
+Warning: money_format() expects parameter 2 to be float, array given in %s on line %d
NULL
-- Iteration 12 --
-Warning: money_format() expects parameter 2 to be double, array given in %s on line %d
+Warning: money_format() expects parameter 2 to be float, array given in %s on line %d
NULL
-- Iteration 13 --
string
@@ -149,29 +149,31 @@ string
string
-- Iteration 19 --
-Warning: money_format() expects parameter 2 to be double, string given in %s on line %d
+Warning: money_format() expects parameter 2 to be float, string given in %s on line %d
NULL
-- Iteration 20 --
-Warning: money_format() expects parameter 2 to be double, string given in %s on line %d
+Warning: money_format() expects parameter 2 to be float, string given in %s on line %d
NULL
-- Iteration 21 --
+
+Notice: A non well formed numeric value encountered in %s on line %d
string
-- Iteration 22 --
-Warning: money_format() expects parameter 2 to be double, string given in %s on line %d
+Warning: money_format() expects parameter 2 to be float, string given in %s on line %d
NULL
-- Iteration 23 --
-Warning: money_format() expects parameter 2 to be double, object given in %s on line %d
+Warning: money_format() expects parameter 2 to be float, object given in %s on line %d
NULL
-- Iteration 24 --
-Warning: money_format() expects parameter 2 to be double, object given in %s on line %d
+Warning: money_format() expects parameter 2 to be float, object given in %s on line %d
NULL
-- Iteration 25 --
-Warning: money_format() expects parameter 2 to be double, resource given in %s on line %d
+Warning: money_format() expects parameter 2 to be float, resource given in %s on line %d
NULL
-- Iteration 26 --
string
diff --git a/ext/standard/tests/strings/moneyformat.phpt b/ext/standard/tests/strings/moneyformat.phpt
index db6c48c7d5..39245772bc 100644
--- a/ext/standard/tests/strings/moneyformat.phpt
+++ b/ext/standard/tests/strings/moneyformat.phpt
@@ -14,10 +14,6 @@ if (setlocale(LC_MONETARY, 'en_US') === false) {
<?php
setlocale(LC_MONETARY, 'en_US');
var_dump( money_format("X%nY", 3.1415));
-var_dump(money_format("AAAAA%n%n%n%n", NULL));
?>
--EXPECTF--
string(7) "X$3.14Y"
-
-Warning: money_format(): Only a single %ci or %cn token can be used in %s on line %d
-bool(false)
diff --git a/ext/standard/tests/strings/nl_langinfo_variation1.phpt b/ext/standard/tests/strings/nl_langinfo_variation1.phpt
index 98edb1ba1c..2d65d0ef07 100644
--- a/ext/standard/tests/strings/nl_langinfo_variation1.phpt
+++ b/ext/standard/tests/strings/nl_langinfo_variation1.phpt
@@ -83,22 +83,22 @@ Warning: nl_langinfo(): Item '-20' is not valid in %s on line %d
bool(false)
-- Iteration 4 --
-Warning: nl_langinfo() expects parameter 1 to be long, array given in %s on line %d
+Warning: nl_langinfo() expects parameter 1 to be integer, array given in %s on line %d
NULL
-- Iteration 5 --
-Warning: nl_langinfo() expects parameter 1 to be long, array given in %s on line %d
+Warning: nl_langinfo() expects parameter 1 to be integer, array given in %s on line %d
NULL
-- Iteration 6 --
-Warning: nl_langinfo() expects parameter 1 to be long, array given in %s on line %d
+Warning: nl_langinfo() expects parameter 1 to be integer, array given in %s on line %d
NULL
-- Iteration 7 --
-Warning: nl_langinfo() expects parameter 1 to be long, object given in %s on line %d
+Warning: nl_langinfo() expects parameter 1 to be integer, object given in %s on line %d
NULL
-- Iteration 8 --
-Warning: nl_langinfo() expects parameter 1 to be long, resource given in %s on line %d
+Warning: nl_langinfo() expects parameter 1 to be integer, resource given in %s on line %d
NULL
===DONE===
diff --git a/ext/standard/tests/strings/printf_basic8.phpt b/ext/standard/tests/strings/printf_basic8.phpt
index 0e028ea9d7..4127bc637f 100644
--- a/ext/standard/tests/strings/printf_basic8.phpt
+++ b/ext/standard/tests/strings/printf_basic8.phpt
@@ -22,7 +22,7 @@ $format2 = "%o %o";
$format3 = "%o %o %o";
$arg1 = 021;
$arg2 = -0347;
-$arg3 = 05678;
+$arg3 = 0567;
echo "\n-- Calling printf() with no arguments --\n";
$result = printf($format);
diff --git a/ext/standard/tests/strings/setlocale_error.phpt b/ext/standard/tests/strings/setlocale_error.phpt
index 99abfcaeb9..a6a8e38205 100644
--- a/ext/standard/tests/strings/setlocale_error.phpt
+++ b/ext/standard/tests/strings/setlocale_error.phpt
@@ -1,7 +1,7 @@
--TEST--
Test setlocale() function : error condition
--INI--
-error_reporting=14335
+error_reporting=E_ALL
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
@@ -35,11 +35,6 @@ echo "\n-- Testing setlocale() function with invalid multiple locales, 'category
//Invalid array of locales
var_dump( setlocale(LC_ALL,"en_US.invalid", "en_AU.invalid", "ko_KR.invalid") );
-echo "\n-- Testing setlocale() function with invalid category --\n";
-//invalid $category
-$invalid_category = "TEST";
-var_dump( setlocale($invalid_category,"en_US.utf8") );
-
echo "\n-- Testing setlocale() function with locale name too long, 'category' = LC_ALL --";
//Invalid locale - locale name too long
var_dump(setlocale(LC_ALL,str_pad('',255,'A')));
@@ -63,13 +58,6 @@ bool(false)
-- Testing setlocale() function with invalid multiple locales, 'category' = LC_ALL --
bool(false)
--- Testing setlocale() function with invalid category --
-
-Deprecated: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead in %s on line %d
-
-Warning: setlocale(): Invalid locale category name TEST, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME in %s on line %d
-bool(false)
-
-- Testing setlocale() function with locale name too long, 'category' = LC_ALL --
Warning: setlocale(): Specified locale name is too long in %s on line %d
bool(false)
diff --git a/ext/standard/tests/strings/sprintf_basic8.phpt b/ext/standard/tests/strings/sprintf_basic8.phpt
index bb9ecd1a66..925689939c 100644
--- a/ext/standard/tests/strings/sprintf_basic8.phpt
+++ b/ext/standard/tests/strings/sprintf_basic8.phpt
@@ -22,7 +22,7 @@ $format2 = "%o %o";
$format3 = "%o %o %o";
$arg1 = 021;
$arg2 = -0347;
-$arg3 = 05678;
+$arg3 = 0567;
// Calling sprintf() with default arguments
var_dump( sprintf($format) );
diff --git a/ext/standard/tests/strings/sprintf_basic8_64bit.phpt b/ext/standard/tests/strings/sprintf_basic8_64bit.phpt
index 76d8f05eac..9c7e1e6535 100644
--- a/ext/standard/tests/strings/sprintf_basic8_64bit.phpt
+++ b/ext/standard/tests/strings/sprintf_basic8_64bit.phpt
@@ -18,7 +18,7 @@ $format2 = "%o %o";
$format3 = "%o %o %o";
$arg1 = 021;
$arg2 = -0347;
-$arg3 = 05678;
+$arg3 = 0567;
// Calling sprintf() with default arguments
var_dump( sprintf($format) );
diff --git a/ext/standard/tests/strings/sprintf_variation10.phpt b/ext/standard/tests/strings/sprintf_variation10.phpt
index 702dc34c77..3880b212df 100644
--- a/ext/standard/tests/strings/sprintf_variation10.phpt
+++ b/ext/standard/tests/strings/sprintf_variation10.phpt
@@ -23,10 +23,10 @@ $integer_values = array (
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
- 01912, // should be quivalent to octal 1
+ 01, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
017777777777 // max positive integer as octal
);
@@ -324,4 +324,4 @@ string(17) "2147483647.000000"
string(30) " 2147483647.000000"
string(4) "0-9]"
string(1) "f"
-Done \ No newline at end of file
+Done
diff --git a/ext/standard/tests/strings/sprintf_variation19.phpt b/ext/standard/tests/strings/sprintf_variation19.phpt
index ae7b910573..fb3f90585e 100644
--- a/ext/standard/tests/strings/sprintf_variation19.phpt
+++ b/ext/standard/tests/strings/sprintf_variation19.phpt
@@ -23,10 +23,10 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
- 01912, // should be quivalent to octal 1
+ 01, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
017777777777 // max positive integer as octal
);
@@ -323,4 +323,4 @@ string(10) "2147483647"
string(30) " 2147483647"
string(10) "a-zA-Z0-9]"
string(1) "s"
-Done \ No newline at end of file
+Done
diff --git a/ext/standard/tests/strings/sprintf_variation21.phpt b/ext/standard/tests/strings/sprintf_variation21.phpt
index afedfcaf7c..20aa1e9d58 100644
--- a/ext/standard/tests/strings/sprintf_variation21.phpt
+++ b/ext/standard/tests/strings/sprintf_variation21.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/sprintf_variation28.phpt b/ext/standard/tests/strings/sprintf_variation28.phpt
index 8fad68b0d9..e295fc8181 100644
--- a/ext/standard/tests/strings/sprintf_variation28.phpt
+++ b/ext/standard/tests/strings/sprintf_variation28.phpt
@@ -29,10 +29,10 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
- 01912, // should be quivalent to octal 1
+ 01, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
017777777777 // max positive integer as octal
);
diff --git a/ext/standard/tests/strings/sprintf_variation28_64bit.phpt b/ext/standard/tests/strings/sprintf_variation28_64bit.phpt
index cd83093a74..f4d8125e98 100644
--- a/ext/standard/tests/strings/sprintf_variation28_64bit.phpt
+++ b/ext/standard/tests/strings/sprintf_variation28_64bit.phpt
@@ -25,10 +25,10 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
- 01912, // should be quivalent to octal 1
+ 01, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
017777777777 // max positive integer as octal
);
diff --git a/ext/standard/tests/strings/sprintf_variation3.phpt b/ext/standard/tests/strings/sprintf_variation3.phpt
index 51a89ea08b..6c0577e4d4 100644
--- a/ext/standard/tests/strings/sprintf_variation3.phpt
+++ b/ext/standard/tests/strings/sprintf_variation3.phpt
@@ -23,10 +23,10 @@ $valid_ints = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
- 01912, // should be quivalent to octal 1
+ 01, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
017777777777 // max positive integer as octal
);
@@ -322,4 +322,4 @@ string(10) "2147483647"
string(30) " 2147483647"
string(4) "0-9]"
string(1) "d"
-Done \ No newline at end of file
+Done
diff --git a/ext/standard/tests/strings/sprintf_variation34.phpt b/ext/standard/tests/strings/sprintf_variation34.phpt
index 8a5cd809d6..db905ebd18 100644
--- a/ext/standard/tests/strings/sprintf_variation34.phpt
+++ b/ext/standard/tests/strings/sprintf_variation34.phpt
@@ -32,7 +32,7 @@ $integer_values = array(
0x7fffffff, // max positive integer as hexadecimal
0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
- 01912, // should be quivalent to octal 1
+ 01, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
017777777777 // max positive integer as octal
);
diff --git a/ext/standard/tests/strings/sprintf_variation34_64bit.phpt b/ext/standard/tests/strings/sprintf_variation34_64bit.phpt
index f9a7805f98..a4914664a2 100644
--- a/ext/standard/tests/strings/sprintf_variation34_64bit.phpt
+++ b/ext/standard/tests/strings/sprintf_variation34_64bit.phpt
@@ -25,10 +25,10 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
- 01912, // should be quivalent to octal 1
+ 01, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
017777777777 // max positive integer as octal
);
diff --git a/ext/standard/tests/strings/sprintf_variation40.phpt b/ext/standard/tests/strings/sprintf_variation40.phpt
index 0da6a10b8a..774650a32c 100644
--- a/ext/standard/tests/strings/sprintf_variation40.phpt
+++ b/ext/standard/tests/strings/sprintf_variation40.phpt
@@ -29,10 +29,10 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
- 01912, // should be quivalent to octal 1
+ 01, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
017777777777 // max positive integer as octal
);
diff --git a/ext/standard/tests/strings/sprintf_variation40_64bit.phpt b/ext/standard/tests/strings/sprintf_variation40_64bit.phpt
index 029e94c782..fffe6155fe 100644
--- a/ext/standard/tests/strings/sprintf_variation40_64bit.phpt
+++ b/ext/standard/tests/strings/sprintf_variation40_64bit.phpt
@@ -28,7 +28,7 @@ $integer_values = array(
0x7fffffff, // max positive integer as hexadecimal
0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
- 01912, // should be quivalent to octal 1
+ 01, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
017777777777 // max positive integer as octal
);
diff --git a/ext/standard/tests/strings/sprintf_variation46.phpt b/ext/standard/tests/strings/sprintf_variation46.phpt
index 36aef14dd8..9b8892d7d0 100644
--- a/ext/standard/tests/strings/sprintf_variation46.phpt
+++ b/ext/standard/tests/strings/sprintf_variation46.phpt
@@ -23,10 +23,10 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
- 01912, // should be quivalent to octal 1
+ 01, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
017777777777 // max positive integer as octal
);
@@ -323,4 +323,4 @@ string(11) "2.147484e+9"
string(30) " 2.147484e+9"
string(4) "0-1]"
string(1) "e"
-Done \ No newline at end of file
+Done
diff --git a/ext/standard/tests/strings/str_pad.phpt b/ext/standard/tests/strings/str_pad.phpt
index 645d8ff385..0c0c2026cd 100644
--- a/ext/standard/tests/strings/str_pad.phpt
+++ b/ext/standard/tests/strings/str_pad.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/str_pad_variation2.phpt b/ext/standard/tests/strings/str_pad_variation2.phpt
index 2bc699069b..6313dd0fe2 100644
--- a/ext/standard/tests/strings/str_pad_variation2.phpt
+++ b/ext/standard/tests/strings/str_pad_variation2.phpt
@@ -102,15 +102,15 @@ string(11) "Test string"
string(1012) "Test string "
-- Iteration 8 --
-Warning: str_pad() expects parameter 2 to be long, array given in %s on line %d
+Warning: str_pad() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 9 --
-Warning: str_pad() expects parameter 2 to be long, array given in %s on line %d
+Warning: str_pad() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 10 --
-Warning: str_pad() expects parameter 2 to be long, array given in %s on line %d
+Warning: str_pad() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 11 --
string(11) "Test string"
@@ -126,11 +126,11 @@ string(11) "Test string"
string(11) "Test string"
-- Iteration 17 --
-Warning: str_pad() expects parameter 2 to be long, object given in %s on line %d
+Warning: str_pad() expects parameter 2 to be integer, object given in %s on line %d
NULL
-- Iteration 18 --
-Warning: str_pad() expects parameter 2 to be long, resource given in %s on line %d
+Warning: str_pad() expects parameter 2 to be integer, resource given in %s on line %d
NULL
-- Iteration 19 --
string(11) "Test string"
diff --git a/ext/standard/tests/strings/str_pad_variation4.phpt b/ext/standard/tests/strings/str_pad_variation4.phpt
index a622304c82..585d79edb3 100644
--- a/ext/standard/tests/strings/str_pad_variation4.phpt
+++ b/ext/standard/tests/strings/str_pad_variation4.phpt
@@ -1,5 +1,7 @@
--TEST--
Test str_pad() function : usage variations - unexpected inputs for '$pad_type' argument
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
--FILE--
<?php
/* Prototype : string str_pad ( string $input , int $pad_length [, string $pad_string [, int $pad_type ]] )
@@ -121,29 +123,31 @@ Warning: str_pad(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_P
NULL
-- Iteration 10 --
-Warning: str_pad() expects parameter 4 to be long, string given in %s on line %d
+Warning: str_pad() expects parameter 4 to be integer, string given in %s on line %d
NULL
-- Iteration 11 --
-Warning: str_pad() expects parameter 4 to be long, string given in %s on line %d
+Warning: str_pad() expects parameter 4 to be integer, string given in %s on line %d
NULL
-- Iteration 12 --
string(20) "****Test string*****"
-- Iteration 13 --
-string(20) "****Test string*****"
+
+Notice: A non well formed numeric value encountered in %s on line %d
+string(20) "*********Test string"
-- Iteration 14 --
string(20) "****Test string*****"
-- Iteration 15 --
-Warning: str_pad() expects parameter 4 to be long, array given in %s on line %d
+Warning: str_pad() expects parameter 4 to be integer, array given in %s on line %d
NULL
-- Iteration 16 --
-Warning: str_pad() expects parameter 4 to be long, array given in %s on line %d
+Warning: str_pad() expects parameter 4 to be integer, array given in %s on line %d
NULL
-- Iteration 17 --
-Warning: str_pad() expects parameter 4 to be long, array given in %s on line %d
+Warning: str_pad() expects parameter 4 to be integer, array given in %s on line %d
NULL
-- Iteration 18 --
string(20) "Test string*********"
@@ -159,7 +163,7 @@ string(20) "*********Test string"
string(20) "*********Test string"
-- Iteration 24 --
-Warning: str_pad() expects parameter 4 to be long, object given in %s on line %d
+Warning: str_pad() expects parameter 4 to be integer, object given in %s on line %d
NULL
-- Iteration 25 --
string(20) "*********Test string"
diff --git a/ext/standard/tests/strings/str_pad_variation5.phpt b/ext/standard/tests/strings/str_pad_variation5.phpt
index 4e1b1a9530..f1f47b932c 100644
--- a/ext/standard/tests/strings/str_pad_variation5.phpt
+++ b/ext/standard/tests/strings/str_pad_variation5.phpt
@@ -24,11 +24,11 @@ echo "*** Testing str_pad() function: with large value for for 'pad_length' argu
//defining '$input' argument
$input = "Test string";
-$pad_length = PHP_INT_MAX;
+$pad_length = PHP_INT_MAX - 16; /* zend_string header is 16 bytes */
var_dump( str_pad($input, $pad_length) );
?>
--EXPECTF--
*** Testing str_pad() function: with large value for for 'pad_length' argument ***
-Fatal error: String allocation overflow, max size is 2147483647 in %s on line %d
+Fatal error: Allowed memory size of 134217728 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
diff --git a/ext/standard/tests/strings/str_repeat.phpt b/ext/standard/tests/strings/str_repeat.phpt
index 73c193b6d7..bbcc489990 100644
--- a/ext/standard/tests/strings/str_repeat.phpt
+++ b/ext/standard/tests/strings/str_repeat.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/str_replace_array_refs.phpt b/ext/standard/tests/strings/str_replace_array_refs.phpt
new file mode 100644
index 0000000000..102bcfa8fe
--- /dev/null
+++ b/ext/standard/tests/strings/str_replace_array_refs.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Test str_replace() function and array refs
+--INI--
+precision=14
+--FILE--
+<?php
+$data = ['a' => 'b', 'numeric' => 1];
+$ref = &$data;
+$b = &$ref['a'];
+$numeric = &$ref['numeric'];
+var_dump(str_replace(array_keys($data), $data, "a numeric"));
+var_dump($numeric);
+var_dump($data['numeric']);
+--EXPECTF--
+string(3) "b 1"
+int(1)
+int(1)
diff --git a/ext/standard/tests/strings/str_replace_array_refs2.phpt b/ext/standard/tests/strings/str_replace_array_refs2.phpt
new file mode 100644
index 0000000000..788c738344
--- /dev/null
+++ b/ext/standard/tests/strings/str_replace_array_refs2.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test str_replace() function and array refs, more cases
+--FILE--
+<?php
+$closure = function (array $array, array $keys, $value)
+{
+ $current = &$array;
+ foreach ($keys as $key)
+ $current = &$current[$key];
+ $current = $value;
+ return $array;
+};
+
+class SomeClass { public $prop; }
+
+$obj = new SomeClass;
+$obj->prop = ['x' => 'property'];
+$obj->prop = $closure($obj->prop, ['x'], 'a');
+var_dump(str_replace(array_keys($obj->prop), $obj->prop, "x property"));
+
+$array = ['x' => 'property'];
+$array = $closure($array, ['x'], 'a');
+var_dump(str_replace(array_keys($array), $array, "x property"));
+
+--EXPECTF--
+string(10) "a property"
+string(10) "a property"
diff --git a/ext/standard/tests/strings/str_split_variation2.phpt b/ext/standard/tests/strings/str_split_variation2.phpt
index ba1297b405..42a5d5ab38 100644
--- a/ext/standard/tests/strings/str_split_variation2.phpt
+++ b/ext/standard/tests/strings/str_split_variation2.phpt
@@ -111,8 +111,8 @@ Warning: str_split(): The length of each segment must be greater than zero in %s
bool(false)
--Iteration 3 --
-Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d
-bool(false)
+Warning: str_split() expects parameter 2 to be integer, float given in %s on line %d
+NULL
--Iteration 4 --
Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d
@@ -123,23 +123,23 @@ Warning: str_split(): The length of each segment must be greater than zero in %s
bool(false)
--Iteration 6 --
-Warning: str_split() expects parameter 2 to be long, array given in %sstr_split_variation2.php on line %d
+Warning: str_split() expects parameter 2 to be integer, array given in %sstr_split_variation2.php on line %d
NULL
--Iteration 7 --
-Warning: str_split() expects parameter 2 to be long, array given in %sstr_split_variation2.php on line %d
+Warning: str_split() expects parameter 2 to be integer, array given in %sstr_split_variation2.php on line %d
NULL
--Iteration 8 --
-Warning: str_split() expects parameter 2 to be long, array given in %sstr_split_variation2.php on line %d
+Warning: str_split() expects parameter 2 to be integer, array given in %sstr_split_variation2.php on line %d
NULL
--Iteration 9 --
-Warning: str_split() expects parameter 2 to be long, array given in %sstr_split_variation2.php on line %d
+Warning: str_split() expects parameter 2 to be integer, array given in %sstr_split_variation2.php on line %d
NULL
--Iteration 10 --
-Warning: str_split() expects parameter 2 to be long, array given in %sstr_split_variation2.php on line %d
+Warning: str_split() expects parameter 2 to be integer, array given in %sstr_split_variation2.php on line %d
NULL
--Iteration 11 --
@@ -257,23 +257,23 @@ Warning: str_split(): The length of each segment must be greater than zero in %s
bool(false)
--Iteration 17 --
-Warning: str_split() expects parameter 2 to be long, string given in %sstr_split_variation2.php on line %d
+Warning: str_split() expects parameter 2 to be integer, string given in %sstr_split_variation2.php on line %d
NULL
--Iteration 18 --
-Warning: str_split() expects parameter 2 to be long, string given in %sstr_split_variation2.php on line %d
+Warning: str_split() expects parameter 2 to be integer, string given in %sstr_split_variation2.php on line %d
NULL
--Iteration 19 --
-Warning: str_split() expects parameter 2 to be long, string given in %sstr_split_variation2.php on line %d
+Warning: str_split() expects parameter 2 to be integer, string given in %sstr_split_variation2.php on line %d
NULL
--Iteration 20 --
-Warning: str_split() expects parameter 2 to be long, string given in %sstr_split_variation2.php on line %d
+Warning: str_split() expects parameter 2 to be integer, string given in %sstr_split_variation2.php on line %d
NULL
--Iteration 21 --
-Warning: str_split() expects parameter 2 to be long, object given in %sstr_split_variation2.php on line %d
+Warning: str_split() expects parameter 2 to be integer, object given in %sstr_split_variation2.php on line %d
NULL
--Iteration 22 --
@@ -285,6 +285,6 @@ Warning: str_split(): The length of each segment must be greater than zero in %s
bool(false)
--Iteration 24 --
-Warning: str_split() expects parameter 2 to be long, resource given in %sstr_split_variation2.php on line %d
+Warning: str_split() expects parameter 2 to be integer, resource given in %sstr_split_variation2.php on line %d
NULL
Done
diff --git a/ext/standard/tests/strings/str_split_variation2_64bit.phpt b/ext/standard/tests/strings/str_split_variation2_64bit.phpt
index 7aeaf0f253..b80a3b42cc 100644
--- a/ext/standard/tests/strings/str_split_variation2_64bit.phpt
+++ b/ext/standard/tests/strings/str_split_variation2_64bit.phpt
@@ -124,23 +124,23 @@ Warning: str_split(): The length of each segment must be greater than zero in %s
bool(false)
--Iteration 6 --
-Warning: str_split() expects parameter 2 to be long, array given in %s on line %d
+Warning: str_split() expects parameter 2 to be integer, array given in %s on line %d
NULL
--Iteration 7 --
-Warning: str_split() expects parameter 2 to be long, array given in %s on line %d
+Warning: str_split() expects parameter 2 to be integer, array given in %s on line %d
NULL
--Iteration 8 --
-Warning: str_split() expects parameter 2 to be long, array given in %s on line %d
+Warning: str_split() expects parameter 2 to be integer, array given in %s on line %d
NULL
--Iteration 9 --
-Warning: str_split() expects parameter 2 to be long, array given in %s on line %d
+Warning: str_split() expects parameter 2 to be integer, array given in %s on line %d
NULL
--Iteration 10 --
-Warning: str_split() expects parameter 2 to be long, array given in %s on line %d
+Warning: str_split() expects parameter 2 to be integer, array given in %s on line %d
NULL
--Iteration 11 --
@@ -258,23 +258,23 @@ Warning: str_split(): The length of each segment must be greater than zero in %s
bool(false)
--Iteration 17 --
-Warning: str_split() expects parameter 2 to be long, string given in %s on line %d
+Warning: str_split() expects parameter 2 to be integer, string given in %s on line %d
NULL
--Iteration 18 --
-Warning: str_split() expects parameter 2 to be long, string given in %s on line %d
+Warning: str_split() expects parameter 2 to be integer, string given in %s on line %d
NULL
--Iteration 19 --
-Warning: str_split() expects parameter 2 to be long, string given in %s on line %d
+Warning: str_split() expects parameter 2 to be integer, string given in %s on line %d
NULL
--Iteration 20 --
-Warning: str_split() expects parameter 2 to be long, string given in %s on line %d
+Warning: str_split() expects parameter 2 to be integer, string given in %s on line %d
NULL
--Iteration 21 --
-Warning: str_split() expects parameter 2 to be long, object given in %s on line %d
+Warning: str_split() expects parameter 2 to be integer, object given in %s on line %d
NULL
--Iteration 22 --
@@ -286,6 +286,6 @@ Warning: str_split(): The length of each segment must be greater than zero in %s
bool(false)
--Iteration 24 --
-Warning: str_split() expects parameter 2 to be long, resource given in %s on line %d
+Warning: str_split() expects parameter 2 to be integer, resource given in %s on line %d
NULL
Done
diff --git a/ext/standard/tests/strings/str_split_variation6.phpt b/ext/standard/tests/strings/str_split_variation6.phpt
index 6d751bbccf..53385a76de 100644
--- a/ext/standard/tests/strings/str_split_variation6.phpt
+++ b/ext/standard/tests/strings/str_split_variation6.phpt
@@ -157,8 +157,8 @@ array(1) {
}
-- Iteration 7 --
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+Warning: str_split() expects parameter 2 to be integer, float given in %s line %d
+NULL
-- Iteration 8 --
Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
diff --git a/ext/standard/tests/strings/str_split_variation7.phpt b/ext/standard/tests/strings/str_split_variation7.phpt
index 455c5b8972..963e2aa14c 100644
--- a/ext/standard/tests/strings/str_split_variation7.phpt
+++ b/ext/standard/tests/strings/str_split_variation7.phpt
@@ -135,8 +135,8 @@ array(1) {
}
-- Iteration 7 --
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+Warning: str_split() expects parameter 2 to be integer, float given in %s on line %d
+NULL
-- Iteration 8 --
Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
diff --git a/ext/standard/tests/strings/str_word_count.phpt b/ext/standard/tests/strings/str_word_count.phpt
index 11e1bb65eb..00e71f781f 100644
--- a/ext/standard/tests/strings/str_word_count.phpt
+++ b/ext/standard/tests/strings/str_word_count.phpt
@@ -87,10 +87,10 @@ bool(false)
Warning: str_word_count(): Invalid format value 999999999 in %s on line %d
bool(false)
-Warning: str_word_count() expects parameter 2 to be long, array given in %s on line %d
+Warning: str_word_count() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: str_word_count() expects parameter 2 to be long, string given in %s on line %d
+Warning: str_word_count() expects parameter 2 to be integer, string given in %s on line %d
NULL
string(55) "Hello friend, you're
looking good today!"
diff --git a/ext/standard/tests/strings/strcspn_variation3.phpt b/ext/standard/tests/strings/strcspn_variation3.phpt
index 8b1923efda..4940b8cfc9 100644
--- a/ext/standard/tests/strings/strcspn_variation3.phpt
+++ b/ext/standard/tests/strings/strcspn_variation3.phpt
@@ -123,42 +123,42 @@ int(0)
-- Iteration with start value as "Array" --
-Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration with start value as "Array" --
-Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration with start value as "Array" --
-Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration with start value as "Array" --
-Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration with start value as "Array" --
-Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration with start value as "" --
@@ -187,42 +187,42 @@ int(0)
-- Iteration with start value as "" --
-Warning: strcspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-Warning: strcspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration with start value as "" --
-Warning: strcspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-Warning: strcspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration with start value as "string" --
-Warning: strcspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-Warning: strcspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration with start value as "string" --
-Warning: strcspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-Warning: strcspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration with start value as "object" --
-Warning: strcspn() expects parameter 3 to be long, object given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, object given in %s on line %d
NULL
-Warning: strcspn() expects parameter 3 to be long, object given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, object given in %s on line %d
NULL
-- Iteration with start value as "" --
@@ -235,9 +235,9 @@ int(0)
-- Iteration with start value as "Resource id #%d" --
-Warning: strcspn() expects parameter 3 to be long, resource given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, resource given in %s on line %d
NULL
-Warning: strcspn() expects parameter 3 to be long, resource given in %s on line %d
+Warning: strcspn() expects parameter 3 to be integer, resource given in %s on line %d
NULL
Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/strcspn_variation4.phpt b/ext/standard/tests/strings/strcspn_variation4.phpt
index d456a23318..d7132a64ce 100644
--- a/ext/standard/tests/strings/strcspn_variation4.phpt
+++ b/ext/standard/tests/strings/strcspn_variation4.phpt
@@ -1,5 +1,7 @@
--TEST--
Test strcspn() function : usage variations - unexpected values of len argument
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
--FILE--
<?php
/* Prototype : proto int strcspn(string str, string mask [, int start [, int len]])
@@ -117,27 +119,27 @@ int(0)
-- Iteration with len value as "Array" --
-Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 4 to be integer, array given in %s on line %d
NULL
-- Iteration with len value as "Array" --
-Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 4 to be integer, array given in %s on line %d
NULL
-- Iteration with len value as "Array" --
-Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 4 to be integer, array given in %s on line %d
NULL
-- Iteration with len value as "Array" --
-Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 4 to be integer, array given in %s on line %d
NULL
-- Iteration with len value as "Array" --
-Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 4 to be integer, array given in %s on line %d
NULL
-- Iteration with len value as "" --
@@ -160,27 +162,27 @@ int(0)
-- Iteration with len value as "" --
-Warning: strcspn() expects parameter 4 to be long, string given in %s on line %d
+Warning: strcspn() expects parameter 4 to be integer, string given in %s on line %d
NULL
-- Iteration with len value as "" --
-Warning: strcspn() expects parameter 4 to be long, string given in %s on line %d
+Warning: strcspn() expects parameter 4 to be integer, string given in %s on line %d
NULL
-- Iteration with len value as "string" --
-Warning: strcspn() expects parameter 4 to be long, string given in %s on line %d
+Warning: strcspn() expects parameter 4 to be integer, string given in %s on line %d
NULL
-- Iteration with len value as "string" --
-Warning: strcspn() expects parameter 4 to be long, string given in %s on line %d
+Warning: strcspn() expects parameter 4 to be integer, string given in %s on line %d
NULL
-- Iteration with len value as "object" --
-Warning: strcspn() expects parameter 4 to be long, object given in %s on line %d
+Warning: strcspn() expects parameter 4 to be integer, object given in %s on line %d
NULL
-- Iteration with len value as "" --
@@ -191,6 +193,6 @@ int(0)
-- Iteration with len value as "Resource id #%d" --
-Warning: strcspn() expects parameter 4 to be long, resource given in %s on line %d
+Warning: strcspn() expects parameter 4 to be integer, resource given in %s on line %d
NULL
-Done \ No newline at end of file
+Done
diff --git a/ext/standard/tests/strings/stripos_variation14.phpt b/ext/standard/tests/strings/stripos_variation14.phpt
index 023585dbb7..aabf0e62ea 100644
--- a/ext/standard/tests/strings/stripos_variation14.phpt
+++ b/ext/standard/tests/strings/stripos_variation14.phpt
@@ -1,5 +1,7 @@
--TEST--
Test stripos() function : usage variations - unexpected inputs for 'offset' argument
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
--FILE--
<?php
/* Prototype : int stripos ( string $haystack, string $needle [, int $offset] );
@@ -102,23 +104,23 @@ int(6)
int(6)
-- Iteration 6 --
-Warning: stripos() expects parameter 3 to be long, array given in %s on line %d
+Warning: stripos() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration 7 --
-Warning: stripos() expects parameter 3 to be long, array given in %s on line %d
+Warning: stripos() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration 8 --
-Warning: stripos() expects parameter 3 to be long, array given in %s on line %d
+Warning: stripos() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration 9 --
-Warning: stripos() expects parameter 3 to be long, array given in %s on line %d
+Warning: stripos() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration 10 --
-Warning: stripos() expects parameter 3 to be long, array given in %s on line %d
+Warning: stripos() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration 11 --
int(6)
@@ -130,15 +132,15 @@ int(6)
int(6)
-- Iteration 15 --
-Warning: stripos() expects parameter 3 to be long, object given in %s on line %d
+Warning: stripos() expects parameter 3 to be integer, object given in %s on line %d
NULL
-- Iteration 16 --
-Warning: stripos() expects parameter 3 to be long, string given in %s on line %d
+Warning: stripos() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration 17 --
-Warning: stripos() expects parameter 3 to be long, string given in %s on line %d
+Warning: stripos() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration 18 --
int(6)
@@ -146,7 +148,7 @@ int(6)
int(6)
-- Iteration 20 --
-Warning: stripos() expects parameter 3 to be long, resource given in %s on line %d
+Warning: stripos() expects parameter 3 to be integer, resource given in %s on line %d
NULL
-- Iteration 21 --
int(6)
diff --git a/ext/standard/tests/strings/stripos_variation15.phpt b/ext/standard/tests/strings/stripos_variation15.phpt
index 2304c1d350..182ecba3c1 100644
--- a/ext/standard/tests/strings/stripos_variation15.phpt
+++ b/ext/standard/tests/strings/stripos_variation15.phpt
@@ -1,5 +1,7 @@
--TEST--
Test stripos() function : usage variations - unexpected inputs for 'haystack', 'needle' & 'offset' arguments
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
--FILE--
<?php
/* Prototype : int stripos ( string $haystack, string $needle [, int $offset] );
@@ -146,15 +148,15 @@ bool(false)
bool(false)
-- Iteration 19 --
-Warning: stripos() expects parameter 3 to be long, object given in %s on line %d
+Warning: stripos() expects parameter 3 to be integer, object given in %s on line %d
NULL
-- Iteration 20 --
-Warning: stripos() expects parameter 3 to be long, string given in %s on line %d
+Warning: stripos() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration 21 --
-Warning: stripos() expects parameter 3 to be long, string given in %s on line %d
+Warning: stripos() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration 22 --
bool(false)
diff --git a/ext/standard/tests/strings/strlen.phpt b/ext/standard/tests/strings/strlen.phpt
index df39f2469c..ab54445943 100644
--- a/ext/standard/tests/strings/strlen.phpt
+++ b/ext/standard/tests/strings/strlen.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strnatcasecmp_variation1.phpt b/ext/standard/tests/strings/strnatcasecmp_variation1.phpt
index fb0fb79ae5..e74f6b73e9 100644
--- a/ext/standard/tests/strings/strnatcasecmp_variation1.phpt
+++ b/ext/standard/tests/strings/strnatcasecmp_variation1.phpt
@@ -48,8 +48,8 @@ str_dump($a, $b);
--EXPECT--
*** Testing strnatcasecmp() : variation ***
int(1)
-int(6)
-int(-2)
+int(1)
+int(-1)
int(-1)
int(0)
int(0)
diff --git a/ext/standard/tests/strings/strncasecmp_variation5.phpt b/ext/standard/tests/strings/strncasecmp_variation5.phpt
index c391ba3e92..e88be79a9c 100644
--- a/ext/standard/tests/strings/strncasecmp_variation5.phpt
+++ b/ext/standard/tests/strings/strncasecmp_variation5.phpt
@@ -1,5 +1,7 @@
--TEST--
Test strncasecmp() function : usage variations - unexpected values for 'len'
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
--FILE--
<?php
/* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
@@ -110,23 +112,23 @@ int(0)
int(0)
-- Iteration 8 --
-Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d
+Warning: strncasecmp() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration 9 --
-Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d
+Warning: strncasecmp() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration 10 --
-Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d
+Warning: strncasecmp() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration 11 --
-Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d
+Warning: strncasecmp() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration 12 --
-Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d
+Warning: strncasecmp() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration 13 --
int(0)
@@ -142,11 +144,11 @@ int(0)
int(0)
-- Iteration 19 --
-Warning: strncasecmp() expects parameter 3 to be long, string given in %s on line %d
+Warning: strncasecmp() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration 20 --
-Warning: strncasecmp() expects parameter 3 to be long, string given in %s on line %d
+Warning: strncasecmp() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration 21 --
int(0)
@@ -154,10 +156,10 @@ int(0)
int(0)
-- Iteration 23 --
-Warning: strncasecmp() expects parameter 3 to be long, resource given in %s on line %d
+Warning: strncasecmp() expects parameter 3 to be integer, resource given in %s on line %d
NULL
-- Iteration 24 --
-Warning: strncasecmp() expects parameter 3 to be long, object given in %s on line %d
+Warning: strncasecmp() expects parameter 3 to be integer, object given in %s on line %d
NULL
*** Done ***
diff --git a/ext/standard/tests/strings/strncasecmp_variation6.phpt b/ext/standard/tests/strings/strncasecmp_variation6.phpt
index 765032b773..56276e9554 100644
--- a/ext/standard/tests/strings/strncasecmp_variation6.phpt
+++ b/ext/standard/tests/strings/strncasecmp_variation6.phpt
@@ -13,11 +13,11 @@ echo "*** Test strncasecmp() function: with binary inputs ***\n";
/* A binary function should work with all 256 characters that a character(8-bit) can take */
echo "\n-- Checking with all 256 characters given, in binary format --\n";
-/* loop through to get all 256 character's equivelent binary value, and check working of strncasecmp() */
+/* loop through to get all 256 character's equivalent binary value, and check working of strncasecmp() */
$count = 1;
for($ASCII = 0; $ASCII <= 255; $ASCII++) {
$str1 = decbin($ASCII); //ASCII value in binary form
- $str2 = decbin( ord( chr($ASCII) ) ); //Getting equivelent ASCII value for the character in binary form
+ $str2 = decbin( ord( chr($ASCII) ) ); //Getting equivalent ASCII value for the character in binary form
echo "-- Iteration $count --\n";
var_dump( strncasecmp($str1, $str2, 8) ); //comparing all the 8-bits; expected: int(0)
var_dump( strncasecmp($str1, $str2, 4) ); //comparing only 4-bits; expected: int(0)
diff --git a/ext/standard/tests/strings/strncmp_variation5.phpt b/ext/standard/tests/strings/strncmp_variation5.phpt
index 73d7e8f319..22aaa439e8 100644
--- a/ext/standard/tests/strings/strncmp_variation5.phpt
+++ b/ext/standard/tests/strings/strncmp_variation5.phpt
@@ -1,5 +1,7 @@
--TEST--
Test strncmp() function : usage variations - different lengths(all types)
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
--FILE--
<?php
/* Prototype : int strncmp ( string $str1, string $str2, int $len );
@@ -124,23 +126,23 @@ int(0)
int(0)
-- Iteration 11 --
-Warning: strncmp() expects parameter 3 to be long, array given in%s on line %d
+Warning: strncmp() expects parameter 3 to be integer, array given in%s on line %d
NULL
-- Iteration 12 --
-Warning: strncmp() expects parameter 3 to be long, array given in%s on line %d
+Warning: strncmp() expects parameter 3 to be integer, array given in%s on line %d
NULL
-- Iteration 13 --
-Warning: strncmp() expects parameter 3 to be long, array given in%s on line %d
+Warning: strncmp() expects parameter 3 to be integer, array given in%s on line %d
NULL
-- Iteration 14 --
-Warning: strncmp() expects parameter 3 to be long, array given in%s on line %d
+Warning: strncmp() expects parameter 3 to be integer, array given in%s on line %d
NULL
-- Iteration 15 --
-Warning: strncmp() expects parameter 3 to be long, array given in%s on line %d
+Warning: strncmp() expects parameter 3 to be integer, array given in%s on line %d
NULL
-- Iteration 16 --
int(0)
@@ -156,11 +158,11 @@ int(0)
int(0)
-- Iteration 22 --
-Warning: strncmp() expects parameter 3 to be long, string given in%s on line %d
+Warning: strncmp() expects parameter 3 to be integer, string given in%s on line %d
NULL
-- Iteration 23 --
-Warning: strncmp() expects parameter 3 to be long, string given in%s on line %d
+Warning: strncmp() expects parameter 3 to be integer, string given in%s on line %d
NULL
-- Iteration 24 --
int(0)
@@ -168,10 +170,10 @@ int(0)
int(0)
-- Iteration 26 --
-Warning: strncmp() expects parameter 3 to be long, resource given in%s on line %d
+Warning: strncmp() expects parameter 3 to be integer, resource given in%s on line %d
NULL
-- Iteration 27 --
-Warning: strncmp() expects parameter 3 to be long, object given in%s on line %d
+Warning: strncmp() expects parameter 3 to be integer, object given in%s on line %d
NULL
*** Done ***
diff --git a/ext/standard/tests/strings/strncmp_variation6.phpt b/ext/standard/tests/strings/strncmp_variation6.phpt
index 7a79d29a51..b3b918920e 100644
--- a/ext/standard/tests/strings/strncmp_variation6.phpt
+++ b/ext/standard/tests/strings/strncmp_variation6.phpt
@@ -13,11 +13,11 @@ echo "*** Test strncmp() function: with binary inputs ***\n";
echo "\n-- Checking with all 256 characters given, in binary format --\n";
/* A binary function should work with all 256 characters that a character(8-bit) can take */
-/* loop through to get all 256 character's equivelent binary value, and check working of strncmp() */
+/* loop through to get all 256 character's equivalent binary value, and check working of strncmp() */
$count = 1;
for($ASCII = 0; $ASCII <= 255; $ASCII++) {
$str1 = decbin($ASCII); //ASCII value in binary form
- $str2 = decbin( ord( chr($ASCII) ) ); //Getting equivelent ASCII value for the character in binary form
+ $str2 = decbin( ord( chr($ASCII) ) ); //Getting equivalent ASCII value for the character in binary form
echo "-- Iteration $count --\n";
var_dump( strncmp($str1, $str2, 8) ); //comparing all the 8-bits; expected: int(0)
var_dump( strncmp($str1, $str2, 4) ); //comparing only 4-bits; expected: int(0)
diff --git a/ext/standard/tests/strings/strpos.phpt b/ext/standard/tests/strings/strpos.phpt
index 44785ef6c8..36854d1b37 100644
--- a/ext/standard/tests/strings/strpos.phpt
+++ b/ext/standard/tests/strings/strpos.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strrev_variation1.phpt b/ext/standard/tests/strings/strrev_variation1.phpt
index c0f8946185..f2334f5a53 100644
--- a/ext/standard/tests/strings/strrev_variation1.phpt
+++ b/ext/standard/tests/strings/strrev_variation1.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strripos.phpt b/ext/standard/tests/strings/strripos.phpt
index eb4e70bd35..924505f6c9 100644
--- a/ext/standard/tests/strings/strripos.phpt
+++ b/ext/standard/tests/strings/strripos.phpt
@@ -15,6 +15,9 @@ strripos() function
var_dump(@strripos("a", ""));
var_dump(@strripos("", "a"));
var_dump(@strripos("\\\\a", "\\a"));
+
+ $fp = fopen(__FILE__, "r");
+ var_dump(@strripos("", $fp));
?>
--EXPECT--
int(5)
@@ -30,4 +33,5 @@ bool(false)
bool(false)
bool(false)
int(1)
+bool(false)
diff --git a/ext/standard/tests/strings/strripos_offset.phpt b/ext/standard/tests/strings/strripos_offset.phpt
index 524699ad52..47a672cc7e 100644
--- a/ext/standard/tests/strings/strripos_offset.phpt
+++ b/ext/standard/tests/strings/strripos_offset.phpt
@@ -1,5 +1,7 @@
--TEST--
strripos() offset integer overflow
+--SKIPIF--
+<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only");
--FILE--
<?php
@@ -16,16 +18,16 @@ var_dump(strripos(1024, "te", -PHP_INT_MAX-1));
echo "Done\n";
?>
--EXPECTF--
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos() expects parameter 3 to be integer, float given in %s on line %d
bool(false)
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos() expects parameter 3 to be integer, float given in %s on line %d
bool(false)
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos() expects parameter 3 to be integer, float given in %s on line %d
bool(false)
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos() expects parameter 3 to be integer, float given in %s on line %d
bool(false)
Warning: strripos() expects parameter 1 to be string, array given in %s on line %d
diff --git a/ext/standard/tests/strings/strrpos_negative_offset.phpt b/ext/standard/tests/strings/strrpos_negative_offset.phpt
new file mode 100644
index 0000000000..940c2274f4
--- /dev/null
+++ b/ext/standard/tests/strings/strrpos_negative_offset.phpt
@@ -0,0 +1,35 @@
+--TEST--
+strr[i]pos() function with negative offset
+--FILE--
+<?php
+ var_dump(strrpos("haysthack", 'ha', -9));
+ var_dump(strrpos("haystack", 'h', -8));
+ var_dump(strrpos("haystack", 'k', -1));
+ var_dump(strrpos("haystack", "ka", -1));
+ var_dump(strrpos("haystack", 'a', -3));
+ var_dump(strrpos("haystack", 'a', -4));
+ var_dump(@strrpos("haystack", 'h', -9));
+
+ var_dump(strripos("HAYSTHACk", 'ha', -9));
+ var_dump(strripos("HAYSTACK", 'h', -8));
+ var_dump(strripos("HAYSTACK", 'k', -1));
+ var_dump(strripos("HAYSTACK", "ka", -1));
+ var_dump(strripos("HAYSTACK", 'a', -3));
+ var_dump(strripos("HAYSTACK", 'a', -4));
+ var_dump(@strripos("HAYSTACK", 'h', -9));
+?>
+--EXPECT--
+int(0)
+int(0)
+int(7)
+bool(false)
+int(5)
+int(1)
+bool(false)
+int(0)
+int(0)
+int(7)
+bool(false)
+int(5)
+int(1)
+bool(false)
diff --git a/ext/standard/tests/strings/strrpos_offset.phpt b/ext/standard/tests/strings/strrpos_offset.phpt
index 18b5847063..4f20895b15 100644
--- a/ext/standard/tests/strings/strrpos_offset.phpt
+++ b/ext/standard/tests/strings/strrpos_offset.phpt
@@ -1,5 +1,7 @@
--TEST--
strrpos() offset integer overflow
+--SKIPIF--
+<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only");
--FILE--
<?php
@@ -15,16 +17,16 @@ var_dump(strrpos(1024, "te", -PHP_INT_MAX-1));
echo "Done\n";
?>
--EXPECTF--
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, float given in %s on line %d
bool(false)
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, float given in %s on line %d
bool(false)
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, float given in %s on line %d
bool(false)
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, float given in %s on line %d
bool(false)
Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
diff --git a/ext/standard/tests/strings/strrpos_variation14.phpt b/ext/standard/tests/strings/strrpos_variation14.phpt
index 53c123a3fd..ba252b9d2b 100644
--- a/ext/standard/tests/strings/strrpos_variation14.phpt
+++ b/ext/standard/tests/strings/strrpos_variation14.phpt
@@ -1,5 +1,7 @@
--TEST--
Test strrpos() function : usage variations - unexpected inputs for 'offset' argument
+--SKIPIF--
+<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only");
--FILE--
<?php
/* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] );
@@ -92,7 +94,7 @@ int(6)
int(6)
-- Iteration 3 --
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, float given in %s on line %d
bool(false)
-- Iteration 4 --
int(6)
@@ -100,23 +102,23 @@ int(6)
int(6)
-- Iteration 6 --
-Warning: strrpos() expects parameter 3 to be long, array given in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, array given in %s on line %d
bool(false)
-- Iteration 7 --
-Warning: strrpos() expects parameter 3 to be long, array given in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, array given in %s on line %d
bool(false)
-- Iteration 8 --
-Warning: strrpos() expects parameter 3 to be long, array given in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, array given in %s on line %d
bool(false)
-- Iteration 9 --
-Warning: strrpos() expects parameter 3 to be long, array given in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, array given in %s on line %d
bool(false)
-- Iteration 10 --
-Warning: strrpos() expects parameter 3 to be long, array given in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, array given in %s on line %d
bool(false)
-- Iteration 11 --
int(6)
@@ -128,15 +130,15 @@ int(6)
int(6)
-- Iteration 15 --
-Warning: strrpos() expects parameter 3 to be long, object given in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, object given in %s on line %d
bool(false)
-- Iteration 16 --
-Warning: strrpos() expects parameter 3 to be long, string given in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-- Iteration 17 --
-Warning: strrpos() expects parameter 3 to be long, string given in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-- Iteration 18 --
int(6)
@@ -144,7 +146,7 @@ int(6)
int(6)
-- Iteration 20 --
-Warning: strrpos() expects parameter 3 to be long, resource given in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, resource given in %s on line %d
bool(false)
-- Iteration 21 --
int(6)
diff --git a/ext/standard/tests/strings/strrpos_variation15.phpt b/ext/standard/tests/strings/strrpos_variation15.phpt
index d958cdc485..02bc804fcf 100644
--- a/ext/standard/tests/strings/strrpos_variation15.phpt
+++ b/ext/standard/tests/strings/strrpos_variation15.phpt
@@ -1,5 +1,7 @@
--TEST--
Test strrpos() function : usage variations - unexpected inputs for 'haystack', 'needle' & 'offset' arguments
+--SKIPIF--
+<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only");
--FILE--
<?php
/* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] );
@@ -110,7 +112,7 @@ Warning: strrpos(): Offset is greater than the length of haystack string in %s o
bool(false)
-- Iteration 7 --
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, float given in %s on line %d
bool(false)
-- Iteration 8 --
bool(false)
@@ -146,15 +148,15 @@ bool(false)
bool(false)
-- Iteration 19 --
-Warning: strrpos() expects parameter 3 to be long, object given in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, object given in %s on line %d
bool(false)
-- Iteration 20 --
-Warning: strrpos() expects parameter 3 to be long, string given in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-- Iteration 21 --
-Warning: strrpos() expects parameter 3 to be long, string given in %s on line %d
+Warning: strrpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-- Iteration 22 --
bool(false)
diff --git a/ext/standard/tests/strings/strspn_variation3.phpt b/ext/standard/tests/strings/strspn_variation3.phpt
index 3195220dea..13eb327f72 100644
--- a/ext/standard/tests/strings/strspn_variation3.phpt
+++ b/ext/standard/tests/strings/strspn_variation3.phpt
@@ -123,42 +123,42 @@ int(2)
-- Iteration with start value as "Array" --
-Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration with start value as "Array" --
-Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration with start value as "Array" --
-Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration with start value as "Array" --
-Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration with start value as "Array" --
-Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, array given in %s on line %d
NULL
-- Iteration with start value as "" --
@@ -187,42 +187,42 @@ int(2)
-- Iteration with start value as "" --
-Warning: strspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-Warning: strspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration with start value as "" --
-Warning: strspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-Warning: strspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration with start value as "string" --
-Warning: strspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-Warning: strspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration with start value as "string" --
-Warning: strspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-Warning: strspn() expects parameter 3 to be long, string given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, string given in %s on line %d
NULL
-- Iteration with start value as "object" --
-Warning: strspn() expects parameter 3 to be long, object given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, object given in %s on line %d
NULL
-Warning: strspn() expects parameter 3 to be long, object given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, object given in %s on line %d
NULL
-- Iteration with start value as "" --
@@ -235,9 +235,9 @@ int(2)
-- Iteration with start value as "Resource id #%d" --
-Warning: strspn() expects parameter 3 to be long, resource given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, resource given in %s on line %d
NULL
-Warning: strspn() expects parameter 3 to be long, resource given in %s on line %d
+Warning: strspn() expects parameter 3 to be integer, resource given in %s on line %d
NULL
Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/strspn_variation4.phpt b/ext/standard/tests/strings/strspn_variation4.phpt
index 87dceac3b8..c723328482 100644
--- a/ext/standard/tests/strings/strspn_variation4.phpt
+++ b/ext/standard/tests/strings/strspn_variation4.phpt
@@ -117,27 +117,27 @@ int(0)
-- Iteration with len value as "Array" --
-Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 4 to be integer, array given in %s on line %d
NULL
-- Iteration with len value as "Array" --
-Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 4 to be integer, array given in %s on line %d
NULL
-- Iteration with len value as "Array" --
-Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 4 to be integer, array given in %s on line %d
NULL
-- Iteration with len value as "Array" --
-Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 4 to be integer, array given in %s on line %d
NULL
-- Iteration with len value as "Array" --
-Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
+Warning: strspn() expects parameter 4 to be integer, array given in %s on line %d
NULL
-- Iteration with len value as "" --
@@ -160,27 +160,27 @@ int(0)
-- Iteration with len value as "" --
-Warning: strspn() expects parameter 4 to be long, string given in %s on line %d
+Warning: strspn() expects parameter 4 to be integer, string given in %s on line %d
NULL
-- Iteration with len value as "" --
-Warning: strspn() expects parameter 4 to be long, string given in %s on line %d
+Warning: strspn() expects parameter 4 to be integer, string given in %s on line %d
NULL
-- Iteration with len value as "string" --
-Warning: strspn() expects parameter 4 to be long, string given in %s on line %d
+Warning: strspn() expects parameter 4 to be integer, string given in %s on line %d
NULL
-- Iteration with len value as "string" --
-Warning: strspn() expects parameter 4 to be long, string given in %s on line %d
+Warning: strspn() expects parameter 4 to be integer, string given in %s on line %d
NULL
-- Iteration with len value as "object" --
-Warning: strspn() expects parameter 4 to be long, object given in %s on line %d
+Warning: strspn() expects parameter 4 to be integer, object given in %s on line %d
NULL
-- Iteration with len value as "" --
@@ -191,6 +191,6 @@ int(0)
-- Iteration with len value as "Resource id #%d" --
-Warning: strspn() expects parameter 4 to be long, resource given in %s on line %d
+Warning: strspn() expects parameter 4 to be integer, resource given in %s on line %d
NULL
Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/strstr.phpt b/ext/standard/tests/strings/strstr.phpt
index bdedb7e9f6..fd7f58ef1a 100644
--- a/ext/standard/tests/strings/strstr.phpt
+++ b/ext/standard/tests/strings/strstr.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strtr_with_reference.phpt b/ext/standard/tests/strings/strtr_with_reference.phpt
new file mode 100644
index 0000000000..a28d1e7be9
--- /dev/null
+++ b/ext/standard/tests/strings/strtr_with_reference.phpt
@@ -0,0 +1,12 @@
+--TEST--
+strtr() with references
+--FILE--
+<?php
+
+$foo = 'foo';
+$arr = ['bar' => &$foo];
+var_dump(strtr('foobar', $arr));
+
+?>
+--EXPECT--
+string(6) "foofoo"
diff --git a/ext/standard/tests/strings/substr.phpt b/ext/standard/tests/strings/substr.phpt
index 5a8db16a54..f0fc06424b 100644
--- a/ext/standard/tests/strings/substr.phpt
+++ b/ext/standard/tests/strings/substr.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/substr_compare.phpt b/ext/standard/tests/strings/substr_compare.phpt
index 1896f3cacc..c78dfca43e 100644
--- a/ext/standard/tests/strings/substr_compare.phpt
+++ b/ext/standard/tests/strings/substr_compare.phpt
@@ -39,8 +39,8 @@ Test
Warning: substr_compare(): The length must be greater than or equal to zero in %s on line %d
bool(false)
-int(0)
+int(4)
-Warning: substr_compare() expects parameter 4 to be long, string given in %s on line %d
+Warning: substr_compare() expects parameter 4 to be integer, string given in %s on line %d
bool(false)
Done
diff --git a/ext/standard/tests/strings/substr_count_error.phpt b/ext/standard/tests/strings/substr_count_error.phpt
index 6f7e7728b1..f6924217b9 100644
--- a/ext/standard/tests/strings/substr_count_error.phpt
+++ b/ext/standard/tests/strings/substr_count_error.phpt
@@ -55,7 +55,7 @@ bool(false)
Notice: Undefined variable: str in %s on line %d
-Warning: substr_count() expects parameter 3 to be long, string given in %s on line %d
+Warning: substr_count() expects parameter 3 to be integer, string given in %s on line %d
NULL
Notice: Undefined variable: str in %s on line %d
diff --git a/ext/standard/tests/strings/substr_count_variation_001.phpt b/ext/standard/tests/strings/substr_count_variation_001.phpt
index 6277d4ddb5..a9d538d17a 100644
--- a/ext/standard/tests/strings/substr_count_variation_001.phpt
+++ b/ext/standard/tests/strings/substr_count_variation_001.phpt
@@ -68,13 +68,13 @@ int(2)
-- 3rd or 4th arg as NULL --
-Warning: substr_count() expects parameter 3 to be long, string given %s on line %d
+Warning: substr_count() expects parameter 3 to be integer, string given %s on line %d
NULL
-Warning: substr_count() expects parameter 3 to be long, string given %s on line %d
+Warning: substr_count() expects parameter 3 to be integer, string given %s on line %d
NULL
-Warning: substr_count() expects parameter 3 to be long, string given %s on line %d
+Warning: substr_count() expects parameter 3 to be integer, string given %s on line %d
NULL
int(0)
int(2)
diff --git a/ext/standard/tests/strings/substr_replace_error.phpt b/ext/standard/tests/strings/substr_replace_error.phpt
index fd314cbd9d..0a15035af2 100644
--- a/ext/standard/tests/strings/substr_replace_error.phpt
+++ b/ext/standard/tests/strings/substr_replace_error.phpt
@@ -52,19 +52,19 @@ NULL
-- Testing substr_replace() function with start and length different types --
-Warning: substr_replace(): 'from' and 'len' should be of same type - numerical or array in %s on line %d
+Warning: substr_replace(): 'start' and 'length' should be of same type - numerical or array in %s on line %d
string(12) "Good morning"
-Warning: substr_replace(): 'from' and 'len' should be of same type - numerical or array in %s on line %d
+Warning: substr_replace(): 'start' and 'length' should be of same type - numerical or array in %s on line %d
string(12) "Good morning"
-- Testing substr_replace() function with start and length with a different number of elements --
-Warning: substr_replace(): 'from' and 'len' should have the same number of elements in %s on line %d
+Warning: substr_replace(): 'start' and 'length' should have the same number of elements in %s on line %d
string(12) "Good morning"
-- Testing substr_replace() function with start and length as arrays but string not--
-Warning: substr_replace(): Functionality of 'from' and 'len' as arrays is not implemented in %s on line %d
+Warning: substr_replace(): Functionality of 'start' and 'length' as arrays is not implemented in %s on line %d
string(12) "Good morning"
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/standard/tests/strings/ucfirst.phpt b/ext/standard/tests/strings/ucfirst.phpt
index 468f7f034e..8fb1a156b4 100644
--- a/ext/standard/tests/strings/ucfirst.phpt
+++ b/ext/standard/tests/strings/ucfirst.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/ucwords_variation4.phpt b/ext/standard/tests/strings/ucwords_variation4.phpt
index bed6550822..2e7092da73 100644
--- a/ext/standard/tests/strings/ucwords_variation4.phpt
+++ b/ext/standard/tests/strings/ucwords_variation4.phpt
@@ -47,7 +47,7 @@ $str_array = array(
//using special chars in sentence
"t@@#$% %test ^test &test *test +test -test",
"!test ~test `test` =test= @test@test.com",
- "/test/r\test\ucwords\t\y\y\u\3 \yy\ /uu/",
+ "/test/r\test\\ucwords\t\y\y\\u\3 \yy\ /uu/",
//only special chars
"!@#$%^&*()_+=-`~"
diff --git a/ext/standard/tests/strings/unpack_bug68225.phpt b/ext/standard/tests/strings/unpack_bug68225.phpt
new file mode 100644
index 0000000000..7f8cdd4701
--- /dev/null
+++ b/ext/standard/tests/strings/unpack_bug68225.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Bug #68225 unpack and X format code
+--FILE--
+<?php
+
+$data = pack('VV', 1, 2);
+
+$result = unpack('Va/X' ,$data);
+var_dump($result);
+
+$result = unpack('Va/X4' ,$data);
+var_dump($result);
+
+$result = unpack('V1a/X4/V1b/V1c/X4/V1d', $data);
+var_dump($result);
+
+?>
+===DONE===
+--EXPECTF--
+array(1) {
+ ["a"]=>
+ int(1)
+}
+array(1) {
+ ["a"]=>
+ int(1)
+}
+array(4) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(2)
+ ["d"]=>
+ int(2)
+}
+===DONE===
+
diff --git a/ext/standard/tests/strings/vfprintf_basic8.phpt b/ext/standard/tests/strings/vfprintf_basic8.phpt
index bf7eb96ad5..aad883c6e9 100644
--- a/ext/standard/tests/strings/vfprintf_basic8.phpt
+++ b/ext/standard/tests/strings/vfprintf_basic8.phpt
@@ -16,7 +16,7 @@ $format2 = "%o %o";
$format3 = "%o %o %o";
$arg1 = array(021);
$arg2 = array(021,0347);
-$arg3 = array(021,0347,05678);
+$arg3 = array(021,0347,0567);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/vfprintf_basic8.txt';
diff --git a/ext/standard/tests/strings/vfprintf_variation11.phpt b/ext/standard/tests/strings/vfprintf_variation11.phpt
index 4bc38851d2..e94e7e0c56 100644
--- a/ext/standard/tests/strings/vfprintf_variation11.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation11.phpt
@@ -36,10 +36,10 @@ $args_array = array(
array(00),
array(-01, 01, +022),
array(-020000000000, 020000000000, 017777777777, -017777777777),
- array(0123456, 012345678, -01234567, 01234567),
+ array(0123456, 01234567, -01234567, 01234567),
array(0111, 02222, -0333333, -044444444),
- array(0x123b, 0xfAb, 0123, 01293),
- array(01234, 05678, -01234, 02345),
+ array(0x123b, 0xfAb, 0123, 012),
+ array(01234, 0567, -01234, 02345),
array(03, 04, 01, 02)
);
diff --git a/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt
index a55297999e..ab3e1ce83f 100644
--- a/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt
@@ -36,10 +36,10 @@ $args_array = array(
array(00),
array(-01, 01, +022),
array(-020000000000, 020000000000, 017777777777, -017777777777),
- array(0123456, 012345678, -01234567, 01234567),
+ array(0123456, 01234567, -01234567, 01234567),
array(0111, 02222, -0333333, -044444444),
- array(0x123b, 0xfAb, 0123, 01293),
- array(01234, 05678, -01234, 02345),
+ array(0x123b, 0xfAb, 0123, 012),
+ array(01234, 0567, -01234, 02345),
array(03, 04, 01, 02)
);
diff --git a/ext/standard/tests/strings/vfprintf_variation13.phpt b/ext/standard/tests/strings/vfprintf_variation13.phpt
index fd34242424..ebb45acb6b 100644
--- a/ext/standard/tests/strings/vfprintf_variation13.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation13.phpt
@@ -38,7 +38,7 @@ $args_array = array(
array(0x7FFFFFFF, -0x7fffffff, +0x7000000, -0x80000000),
array(123456, 12345678, -1234567, 1234567),
array(1, 0x2222, 0333333, -0x44444444),
- array(0x123b, 0xfAb, "0xaxz", 01293),
+ array(0x123b, 0xfAb, "0xaxz", 012),
array(0x1234, 0x34, 0x2ff),
array(0x3, 0x4, 0x1, 0x2)
diff --git a/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt
index 68baed8537..34089e2b78 100644
--- a/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt
@@ -38,7 +38,7 @@ $args_array = array(
array(0x7FFFFFFF, -0x7fffffff, +0x7000000, -0x80000000),
array(123456, 12345678, -1234567, 1234567),
array(1, 0x2222, 0333333, -0x44444444),
- array(0x123b, 0xfAb, "0xaxz", 01293),
+ array(0x123b, 0xfAb, "0xaxz", 012),
array(0x1234, 0x34, 0x2ff),
array(0x3, 0x4, 0x1, 0x2)
diff --git a/ext/standard/tests/strings/vfprintf_variation19.phpt b/ext/standard/tests/strings/vfprintf_variation19.phpt
index 26c21e1e3c..b2fbdd88cf 100644
--- a/ext/standard/tests/strings/vfprintf_variation19.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation19.phpt
@@ -38,7 +38,7 @@ $args_array = array(
array(65, 66, 67),
array(2e1, 2e-1, -2e1),
array(-11, +22, 33),
- array(012, -02394, +02389),
+ array(012, -023, +023),
array(0x11, -0x22, +0x33),
array(0x11, -0x22, +0x33),
array(2e1, 2e-1, -2e1)
diff --git a/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt
index a56357cfdf..8153ce8129 100644
--- a/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt
@@ -38,7 +38,7 @@ $args_array = array(
array(65, 66, 67),
array(2e1, 2e-1, -2e1),
array(-11, +22, 33),
- array(012, -02394, +02389),
+ array(012, -023, +023),
array(0x11, -0x22, +0x33),
array(0x11, -0x22, +0x33),
array(2e1, 2e-1, -2e1)
diff --git a/ext/standard/tests/strings/vfprintf_variation3.phpt b/ext/standard/tests/strings/vfprintf_variation3.phpt
index 1ae945990c..99db0bf00b 100644
--- a/ext/standard/tests/strings/vfprintf_variation3.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation3.phpt
@@ -35,7 +35,7 @@ $args_array = array(
array(2147483647, -2147483648, +2147483640, -2147483640),
array(123456, 12345678, -1234567, 1234567),
array(111, 2222, 333333, 44444444),
- array(0x123b, 0xfAb, 0123, 01293),
+ array(0x123b, 0xfAb, 0123, 012),
array(1234, -5678, 2345),
array(3, 4, 1, 2)
diff --git a/ext/standard/tests/strings/vfprintf_variation5.phpt b/ext/standard/tests/strings/vfprintf_variation5.phpt
index eb3646ca1f..9845a3ff2c 100644
--- a/ext/standard/tests/strings/vfprintf_variation5.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation5.phpt
@@ -35,7 +35,7 @@ $args_array = array(
array(2147483649, -2147483647, +2147483640, -2147483640),
array(2e5, 2e-5, -2e5, -2e-5),
array(0.2E5, -0.2e40, 0.2E-20, 0.2E+20),
- array(0x123b, 0xfAb, 0123, 01293),
+ array(0x123b, 0xfAb, 0123, 012),
array(1234.1234, -5678.5678, 2345.2345),
array(3.33, 4.44, 1.11, 2.22)
diff --git a/ext/standard/tests/strings/vfprintf_variation9.phpt b/ext/standard/tests/strings/vfprintf_variation9.phpt
index dd3093c8c9..8481b41ade 100644
--- a/ext/standard/tests/strings/vfprintf_variation9.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation9.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/vprintf_basic8.phpt b/ext/standard/tests/strings/vprintf_basic8.phpt
index 91c6dd782d..d5f6e222d0 100644
--- a/ext/standard/tests/strings/vprintf_basic8.phpt
+++ b/ext/standard/tests/strings/vprintf_basic8.phpt
@@ -16,7 +16,7 @@ $format2 = "%o %o";
$format3 = "%o %o %o";
$arg1 = array(021);
$arg2 = array(021,0347);
-$arg3 = array(021,0347,05678);
+$arg3 = array(021,0347,0567);
$result = vprintf($format1,$arg1);
echo "\n";
diff --git a/ext/standard/tests/strings/vprintf_variation11.phpt b/ext/standard/tests/strings/vprintf_variation11.phpt
index f803e96c83..4207bc294e 100644
--- a/ext/standard/tests/strings/vprintf_variation11.phpt
+++ b/ext/standard/tests/strings/vprintf_variation11.phpt
@@ -36,10 +36,10 @@ $args_array = array(
array(00),
array(-01, 01, +022),
array(-020000000000, 020000000000, 017777777777, -017777777777),
- array(0123456, 012345678, -01234567, 01234567),
+ array(0123456, 01234567, -01234567, 01234567),
array(0111, 02222, -0333333, -044444444),
- array(0x123b, 0xfAb, 0123, 01293),
- array(01234, 05678, -01234, 02345),
+ array(0x123b, 0xfAb, 0123, 012),
+ array(01234, 0567, -01234, 02345),
array(03, 04, 01, 02)
);
diff --git a/ext/standard/tests/strings/vprintf_variation11_64bit.phpt b/ext/standard/tests/strings/vprintf_variation11_64bit.phpt
index 5f65c5fb44..039006fdc6 100644
--- a/ext/standard/tests/strings/vprintf_variation11_64bit.phpt
+++ b/ext/standard/tests/strings/vprintf_variation11_64bit.phpt
@@ -36,10 +36,10 @@ $args_array = array(
array(00),
array(-01, 01, +022),
array(-020000000000, 020000000000, 017777777777, -017777777777),
- array(0123456, 012345678, -01234567, 01234567),
+ array(0123456, 01234567, -01234567, 01234567),
array(0111, 02222, -0333333, -044444444),
- array(0x123b, 0xfAb, 0123, 01293),
- array(01234, 05678, -01234, 02345),
+ array(0x123b, 0xfAb, 0123, 012),
+ array(01234, 0567, -01234, 02345),
array(03, 04, 01, 02)
);
diff --git a/ext/standard/tests/strings/vprintf_variation13.phpt b/ext/standard/tests/strings/vprintf_variation13.phpt
index 6b629c851d..240db721e8 100644
--- a/ext/standard/tests/strings/vprintf_variation13.phpt
+++ b/ext/standard/tests/strings/vprintf_variation13.phpt
@@ -38,7 +38,7 @@ $args_array = array(
array(0x7FFFFFFF, -0x7fffffff, +0x7000000, -0x80000000),
array(123456, 12345678, -1234567, 1234567),
array(1, 0x2222, 0333333, -0x44444444),
- array(0x123b, 0xfAb, "0xaxz", 01293),
+ array(0x123b, 0xfAb, "0xaxz", 012),
array(0x1234, 0x34, 0x2ff),
array(0x3, 0x4, 0x1, 0x2)
diff --git a/ext/standard/tests/strings/vprintf_variation13_64bit.phpt b/ext/standard/tests/strings/vprintf_variation13_64bit.phpt
index 8cf768b776..06d2bec26d 100644
--- a/ext/standard/tests/strings/vprintf_variation13_64bit.phpt
+++ b/ext/standard/tests/strings/vprintf_variation13_64bit.phpt
@@ -38,7 +38,7 @@ $args_array = array(
array(0x7FFFFFFF, -0x7fffffff, +0x7000000, -0x80000000),
array(123456, 12345678, -1234567, 1234567),
array(1, 0x2222, 0333333, -0x44444444),
- array(0x123b, 0xfAb, "0xaxz", 01293),
+ array(0x123b, 0xfAb, "0xaxz", 012),
array(0x1234, 0x34, 0x2ff),
array(0x3, 0x4, 0x1, 0x2)
diff --git a/ext/standard/tests/strings/vprintf_variation19.phpt b/ext/standard/tests/strings/vprintf_variation19.phpt
index a9288a1634..8b826d8e94 100644
--- a/ext/standard/tests/strings/vprintf_variation19.phpt
+++ b/ext/standard/tests/strings/vprintf_variation19.phpt
@@ -38,7 +38,7 @@ $args_array = array(
array(65, 66, 67),
array(2e1, 2e-1, -2e1),
array(-11, +22, 33),
- array(012, -02394, +02389),
+ array(012, -023, +023),
array(0x11, -0x22, +0x33),
array(0x11, -0x22, +0x33),
array(2e1, 2e-1, -2e1)
diff --git a/ext/standard/tests/strings/vprintf_variation19_64bit.phpt b/ext/standard/tests/strings/vprintf_variation19_64bit.phpt
index d98199624f..6abc134549 100644
--- a/ext/standard/tests/strings/vprintf_variation19_64bit.phpt
+++ b/ext/standard/tests/strings/vprintf_variation19_64bit.phpt
@@ -38,7 +38,7 @@ $args_array = array(
array(65, 66, 67),
array(2e1, 2e-1, -2e1),
array(-11, +22, 33),
- array(012, -02394, +02389),
+ array(012, -023, +023),
array(0x11, -0x22, +0x33),
array(0x11, -0x22, +0x33),
array(2e1, 2e-1, -2e1)
diff --git a/ext/standard/tests/strings/vprintf_variation3.phpt b/ext/standard/tests/strings/vprintf_variation3.phpt
index 41c76487c8..0b59ddda1f 100644
--- a/ext/standard/tests/strings/vprintf_variation3.phpt
+++ b/ext/standard/tests/strings/vprintf_variation3.phpt
@@ -35,7 +35,7 @@ $args_array = array(
array(2147483647, -2147483648, +2147483640, -2147483640),
array(123456, 12345678, -1234567, 1234567),
array(111, 2222, 333333, 44444444),
- array(0x123b, 0xfAb, 0123, 01293),
+ array(0x123b, 0xfAb, 0123, 012),
array(1234, -5678, 2345),
array(3, 4, 1, 2)
diff --git a/ext/standard/tests/strings/vprintf_variation5.phpt b/ext/standard/tests/strings/vprintf_variation5.phpt
index 6388f284c6..f54d1e19c5 100644
--- a/ext/standard/tests/strings/vprintf_variation5.phpt
+++ b/ext/standard/tests/strings/vprintf_variation5.phpt
@@ -35,7 +35,7 @@ $args_array = array(
array(2147483649, -2147483647, +2147483640, -2147483640),
array(2e5, 2e-5, -2e5, -2e-5),
array(0.2E5, -0.2e40, 0.2E-20, 0.2E+20),
- array(0x123b, 0xfAb, 0123, 01293),
+ array(0x123b, 0xfAb, 0123, 012),
array(1234.1234, -5678.5678, 2345.2345),
array(3.33, 4.44, 1.11, 2.22)
diff --git a/ext/standard/tests/strings/vprintf_variation9.phpt b/ext/standard/tests/strings/vprintf_variation9.phpt
index a7b513f633..5ad2db2afa 100644
--- a/ext/standard/tests/strings/vprintf_variation9.phpt
+++ b/ext/standard/tests/strings/vprintf_variation9.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/vsprintf_basic8.phpt b/ext/standard/tests/strings/vsprintf_basic8.phpt
index 59f17b6507..cd2929e007 100644
--- a/ext/standard/tests/strings/vsprintf_basic8.phpt
+++ b/ext/standard/tests/strings/vsprintf_basic8.phpt
@@ -16,7 +16,7 @@ $format2 = "%o %o";
$format3 = "%o %o %o";
$arg1 = array(021);
$arg2 = array(021,0347);
-$arg3 = array(021,0347,05678);
+$arg3 = array(021,0347,0567);
var_dump( vsprintf($format1,$arg1) );
var_dump( vsprintf($format2,$arg2) );
diff --git a/ext/standard/tests/strings/vsprintf_variation11.phpt b/ext/standard/tests/strings/vsprintf_variation11.phpt
index e7fe663c4e..4cc5b02922 100644
--- a/ext/standard/tests/strings/vsprintf_variation11.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation11.phpt
@@ -36,10 +36,10 @@ $args_array = array(
array(00),
array(-01, 01, +022),
array(-020000000000, 020000000000, 017777777777, -017777777777),
- array(0123456, 012345678, -01234567, 01234567),
+ array(0123456, 01234567, -01234567, 01234567),
array(0111, 02222, -0333333, -044444444),
- array(0x123b, 0xfAb, 0123, 01293),
- array(01234, 05678, -01234, 02345),
+ array(0x123b, 0xfAb, 0123, 012),
+ array(01234, 0567, -01234, 02345),
array(03, 04, 01, 02)
);
diff --git a/ext/standard/tests/strings/vsprintf_variation11_64bit.phpt b/ext/standard/tests/strings/vsprintf_variation11_64bit.phpt
index 61327c84ba..841d104b81 100644
--- a/ext/standard/tests/strings/vsprintf_variation11_64bit.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation11_64bit.phpt
@@ -36,10 +36,10 @@ $args_array = array(
array(00),
array(-01, 01, +022),
array(-020000000000, 020000000000, 017777777777, -017777777777),
- array(0123456, 012345678, -01234567, 01234567),
+ array(0123456, 01234567, -01234567, 01234567),
array(0111, 02222, -0333333, -044444444),
- array(0x123b, 0xfAb, 0123, 01293),
- array(01234, 05678, -01234, 02345),
+ array(0x123b, 0xfAb, 0123, 012),
+ array(01234, 0567, -01234, 02345),
array(03, 04, 01, 02)
);
diff --git a/ext/standard/tests/strings/vsprintf_variation13.phpt b/ext/standard/tests/strings/vsprintf_variation13.phpt
index 3e89fa3508..b617975759 100644
--- a/ext/standard/tests/strings/vsprintf_variation13.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation13.phpt
@@ -38,7 +38,7 @@ $args_array = array(
array(0x7FFFFFFF, -0x7fffffff, +0x7000000, -0x80000000),
array(123456, 12345678, -1234567, 1234567),
array(1, 0x2222, 0333333, -0x44444444),
- array(0x123b, 0xfAb, "0xaxz", 01293),
+ array(0x123b, 0xfAb, "0xaxz", 012),
array(0x1234, 0x34, 0x2ff),
array(0x3, 0x4, 0x1, 0x2)
diff --git a/ext/standard/tests/strings/vsprintf_variation13_64bit.phpt b/ext/standard/tests/strings/vsprintf_variation13_64bit.phpt
index 749a4a858f..8d2533a8fc 100644
--- a/ext/standard/tests/strings/vsprintf_variation13_64bit.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation13_64bit.phpt
@@ -38,7 +38,7 @@ $args_array = array(
array(0x7FFFFFFF, -0x7fffffff, +0x7000000, -0x80000000),
array(123456, 12345678, -1234567, 1234567),
array(1, 0x2222, 0333333, -0x44444444),
- array(0x123b, 0xfAb, "0xaxz", 01293),
+ array(0x123b, 0xfAb, "0xaxz", 012),
array(0x1234, 0x34, 0x2ff),
array(0x3, 0x4, 0x1, 0x2)
diff --git a/ext/standard/tests/strings/vsprintf_variation19.phpt b/ext/standard/tests/strings/vsprintf_variation19.phpt
index 4ad276a880..8d475b75a3 100644
--- a/ext/standard/tests/strings/vsprintf_variation19.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation19.phpt
@@ -38,7 +38,7 @@ $args_array = array(
array(65, 66, 67),
array(2e1, 2e-1, -2e1),
array(-11, +22, 33),
- array(012, -02394, +02389),
+ array(012, -023, +023),
array(0x11, -0x22, +0x33),
array(0x11, -0x22, +0x33),
array(2e1, 2e-1, -2e1)
diff --git a/ext/standard/tests/strings/vsprintf_variation19_64bit.phpt b/ext/standard/tests/strings/vsprintf_variation19_64bit.phpt
index 6e805feb7f..69145ba963 100644
--- a/ext/standard/tests/strings/vsprintf_variation19_64bit.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation19_64bit.phpt
@@ -38,7 +38,7 @@ $args_array = array(
array(65, 66, 67),
array(2e1, 2e-1, -2e1),
array(-11, +22, 33),
- array(012, -02394, +02389),
+ array(012, -023, +023),
array(0x11, -0x22, +0x33),
array(0x11, -0x22, +0x33),
array(2e1, 2e-1, -2e1)
diff --git a/ext/standard/tests/strings/vsprintf_variation3.phpt b/ext/standard/tests/strings/vsprintf_variation3.phpt
index fff82c8032..2932e15f18 100644
--- a/ext/standard/tests/strings/vsprintf_variation3.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation3.phpt
@@ -35,7 +35,7 @@ $args_array = array(
array(2147483647, -2147483648, +2147483640, -2147483640),
array(123456, 12345678, -1234567, 1234567),
array(111, 2222, 333333, 44444444),
- array(0x123b, 0xfAb, 0123, 01293),
+ array(0x123b, 0xfAb, 0123, 012),
array(1234, -5678, 2345),
array(3, 4, 1, 2)
diff --git a/ext/standard/tests/strings/vsprintf_variation5.phpt b/ext/standard/tests/strings/vsprintf_variation5.phpt
index dd356fbbe0..b2bd0d5b79 100644
--- a/ext/standard/tests/strings/vsprintf_variation5.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation5.phpt
@@ -35,7 +35,7 @@ $args_array = array(
array(2147483649, -2147483647, +2147483640, -2147483640),
array(2e5, 2e-5, -2e5, -2e-5),
array(0.2E5, -0.2e40, 0.2E-20, 0.2E+20),
- array(0x123b, 0xfAb, 0123, 01293),
+ array(0x123b, 0xfAb, 0123, 012),
array(1234.1234, -5678.5678, 2345.2345),
array(3.33, 4.44, 1.11, 2.22)
diff --git a/ext/standard/tests/strings/vsprintf_variation9.phpt b/ext/standard/tests/strings/vsprintf_variation9.phpt
index 2d46637391..c16531b2f5 100644
--- a/ext/standard/tests/strings/vsprintf_variation9.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation9.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/wordwrap_variation2.phpt b/ext/standard/tests/strings/wordwrap_variation2.phpt
index b914a2a815..5f51da81f8 100644
--- a/ext/standard/tests/strings/wordwrap_variation2.phpt
+++ b/ext/standard/tests/strings/wordwrap_variation2.phpt
@@ -128,68 +128,68 @@ string(39) "testing<br />\nwordwrap<br />\nfunction"
string(223) "<br />\nt<br />\ne<br />\ns<br />\nt<br />\ni<br />\nn<br />\ng<br />\n<br />\nw<br />\no<br />\nr<br />\nd<br />\nw<br />\nr<br />\na<br />\np<br />\n<br />\nf<br />\nu<br />\nn<br />\nc<br />\nt<br />\ni<br />\no<br />\nn"
-- Iteration 4 --
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 5 --
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 6 --
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 7 --
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 8 --
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, array given in %s on line %d
NULL
-- Iteration 9 --
string(25) "testing
@@ -225,42 +225,42 @@ Warning: wordwrap(): Can't force cut when width is zero in %s on line %d
bool(false)
-- Iteration 13 --
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-- Iteration 14 --
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-- Iteration 15 --
-Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, object given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, object given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, object given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, object given in %s on line %d
NULL
-- Iteration 16 --
string(25) "testing
@@ -282,42 +282,42 @@ Warning: wordwrap(): Can't force cut when width is zero in %s on line %d
bool(false)
-- Iteration 18 --
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-- Iteration 19 --
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, string given in %s on line %d
NULL
-- Iteration 20 --
-Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, resource given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, resource given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, resource given in %s on line %d
NULL
-Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d
+Warning: wordwrap() expects parameter 2 to be integer, resource given in %s on line %d
NULL
-- Iteration 21 --
string(25) "testing