From: Nikita Popov Date: Wed, 4 Jul 2018 21:16:05 +0000 (+0200) Subject: Deprecate non-string needles in string search functions X-Git-Tag: php-7.3.0beta1~94 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4a9da389b728dcff2b499ff64fefd1c8e762c85;p=php Deprecate non-string needles in string search functions Part of https://wiki.php.net/rfc/deprecations_php_7_3. --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 792bd914e4..4c603721c7 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1881,6 +1881,10 @@ PHP_FUNCTION(stristr) } needle_char[1] = 0; + php_error_docref(NULL, E_DEPRECATED, + "Non-string needles will be interpreted as strings in the future. " \ + "Use an explicit chr() call to preserve the current behavior"); + found = php_stristr(haystack_dup, needle_char, ZSTR_LEN(haystack), 1); } @@ -1930,6 +1934,10 @@ PHP_FUNCTION(strstr) } needle_char[1] = 0; + php_error_docref(NULL, E_DEPRECATED, + "Non-string needles will be interpreted as strings in the future. " \ + "Use an explicit chr() call to preserve the current behavior"); + found = php_memnstr(ZSTR_VAL(haystack), needle_char, 1, ZSTR_VAL(haystack) + ZSTR_LEN(haystack)); } @@ -1990,6 +1998,10 @@ PHP_FUNCTION(strpos) } needle_char[1] = 0; + php_error_docref(NULL, E_DEPRECATED, + "Non-string needles will be interpreted as strings in the future. " \ + "Use an explicit chr() call to preserve the current behavior"); + found = (char*)php_memnstr(ZSTR_VAL(haystack) + offset, needle_char, 1, @@ -2047,6 +2059,11 @@ PHP_FUNCTION(stripos) if (php_needle_char(needle, needle_char) != SUCCESS) { RETURN_FALSE; } + + php_error_docref(NULL, E_DEPRECATED, + "Non-string needles will be interpreted as strings in the future. " \ + "Use an explicit chr() call to preserve the current behavior"); + haystack_dup = php_string_tolower(haystack); needle_char[0] = tolower(needle_char[0]); needle_char[1] = '\0'; @@ -2095,6 +2112,11 @@ PHP_FUNCTION(strrpos) if (php_needle_char(zneedle, ord_needle) != SUCCESS) { RETURN_FALSE; } + + php_error_docref(NULL, E_DEPRECATED, + "Non-string needles will be interpreted as strings in the future. " \ + "Use an explicit chr() call to preserve the current behavior"); + ord_needle[1] = '\0'; needle = ord_needle; needle_len = 1; @@ -2159,6 +2181,11 @@ PHP_FUNCTION(strripos) ZSTR_ALLOCA_FREE(ord_needle, use_heap); RETURN_FALSE; } + + php_error_docref(NULL, E_DEPRECATED, + "Non-string needles will be interpreted as strings in the future. " \ + "Use an explicit chr() call to preserve the current behavior"); + ZSTR_VAL(ord_needle)[1] = '\0'; needle = ord_needle; } @@ -2263,6 +2290,10 @@ PHP_FUNCTION(strrchr) RETURN_FALSE; } + php_error_docref(NULL, E_DEPRECATED, + "Non-string needles will be interpreted as strings in the future. " \ + "Use an explicit chr() call to preserve the current behavior"); + found = zend_memrchr(ZSTR_VAL(haystack), needle_chr, ZSTR_LEN(haystack)); } diff --git a/ext/standard/tests/strings/stripos.phpt b/ext/standard/tests/strings/stripos.phpt index ef0efe5b23..057b8ca494 100644 --- a/ext/standard/tests/strings/stripos.phpt +++ b/ext/standard/tests/strings/stripos.phpt @@ -28,7 +28,7 @@ stripos() function test echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- int(0) int(5) int(5) @@ -45,11 +45,23 @@ int(0) bool(false) bool(false) bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) int(1) Done diff --git a/ext/standard/tests/strings/stripos_variation1.phpt b/ext/standard/tests/strings/stripos_variation1.phpt index ba02430c68..1494076586 100644 --- a/ext/standard/tests/strings/stripos_variation1.phpt +++ b/ext/standard/tests/strings/stripos_variation1.phpt @@ -81,7 +81,7 @@ for($index=0; $index ---EXPECT-- +--EXPECTF-- *** Testing stripos() function: with double quoted strings *** -- Iteration 1 -- int(2) @@ -117,16 +117,32 @@ int(9) int(8) bool(false) -- Iteration 12 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d int(8) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d int(8) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d int(8) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d int(8) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 16 -- bool(false) diff --git a/ext/standard/tests/strings/stripos_variation10.phpt b/ext/standard/tests/strings/stripos_variation10.phpt index 556428d47f..70291c48a3 100644 --- a/ext/standard/tests/strings/stripos_variation10.phpt +++ b/ext/standard/tests/strings/stripos_variation10.phpt @@ -95,30 +95,48 @@ echo "*** Done ***"; *** Testing stripos() function with unexpected values for needle *** -- Iteration 1 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 4 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 10 -- @@ -147,20 +165,30 @@ Warning: stripos(): needle is not a string or an integer in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 16 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 17 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 18 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 19 -- Notice: Object of class sample could not be converted to int in %s on line %d + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 20 -- @@ -170,9 +198,13 @@ bool(false) bool(false) -- Iteration 22 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 24 -- @@ -181,8 +213,12 @@ Warning: stripos(): needle is not a string or an integer in %s on line %d %s -- Iteration 25 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 26 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) *** Done *** diff --git a/ext/standard/tests/strings/stripos_variation11.phpt b/ext/standard/tests/strings/stripos_variation11.phpt index 0c8fd4a99d..d4fa84a613 100644 --- a/ext/standard/tests/strings/stripos_variation11.phpt +++ b/ext/standard/tests/strings/stripos_variation11.phpt @@ -91,31 +91,67 @@ echo "*** Done ***"; --EXPECTF-- *** Testing stripos() function with unexpected values for haystack and needle *** -- Iteration 1 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 4 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 10 -- @@ -153,7 +189,11 @@ NULL Warning: stripos() expects parameter 1 to be string, array given in %s on line %d NULL -- Iteration 15 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 16 -- bool(false) @@ -161,7 +201,11 @@ bool(false) Warning: stripos(): Offset not contained in string in %s on line %d bool(false) -- Iteration 17 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 18 -- bool(false) @@ -171,9 +215,13 @@ bool(false) -- Iteration 19 -- Notice: Object of class sample could not be converted to int in %s on line %d + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) Notice: Object of class sample could not be converted to int in %s on line %d + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 20 -- bool(false) diff --git a/ext/standard/tests/strings/stripos_variation15.phpt b/ext/standard/tests/strings/stripos_variation15.phpt index 51583edeb4..819baf08c4 100644 --- a/ext/standard/tests/strings/stripos_variation15.phpt +++ b/ext/standard/tests/strings/stripos_variation15.phpt @@ -91,8 +91,12 @@ echo "*** Done ***"; --EXPECTF-- *** Testing stripos() function with unexpected values for haystack, needle & offset *** -- Iteration 1 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 3 -- @@ -115,8 +119,12 @@ bool(false) Warning: stripos(): Offset not contained in string in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 10 -- @@ -139,10 +147,14 @@ NULL Warning: stripos() expects parameter 1 to be string, array given in %s on line %d NULL -- Iteration 15 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 16 -- bool(false) -- Iteration 17 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 18 -- bool(false) diff --git a/ext/standard/tests/strings/stripos_variation2.phpt b/ext/standard/tests/strings/stripos_variation2.phpt index 97a9864509..bb77d1becb 100644 --- a/ext/standard/tests/strings/stripos_variation2.phpt +++ b/ext/standard/tests/strings/stripos_variation2.phpt @@ -83,7 +83,7 @@ for($index=0; $index ---EXPECT-- +--EXPECTF-- *** Testing stripos() function: with single quoted strings *** -- Iteration 1 -- int(2) @@ -119,16 +119,32 @@ bool(false) int(10) int(10) -- Iteration 12 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 16 -- bool(false) @@ -218,7 +234,11 @@ bool(false) bool(false) bool(false) -- Iteration 45 -- + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d int(26) + +Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 46 -- int(0) diff --git a/ext/standard/tests/strings/stristr2.phpt b/ext/standard/tests/strings/stristr2.phpt index 4b5ca494ac..b899b4739d 100644 --- a/ext/standard/tests/strings/stristr2.phpt +++ b/ext/standard/tests/strings/stristr2.phpt @@ -16,10 +16,14 @@ var_dump(stristr($email, 97)); var_dump(stristr($email, 97, 1)); ?> ---EXPECT-- +--EXPECTF-- string(7) "cCdEfGh" string(2) "Ab" string(5) "eEfGh" string(4) "AbCd" + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d string(11) "azAbCdeEfGh" + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d string(1) "w" diff --git a/ext/standard/tests/strings/stristr_variation2.phpt b/ext/standard/tests/strings/stristr_variation2.phpt index 651f048af6..644fe24b10 100644 --- a/ext/standard/tests/strings/stristr_variation2.phpt +++ b/ext/standard/tests/strings/stristr_variation2.phpt @@ -83,18 +83,32 @@ fclose($file_handle); //closing the file handle --EXPECTF-- *** Testing stristr() function: with unexpected inputs for 'needle' argument *** -- Iteration 1 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 4 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 8 -- @@ -109,27 +123,45 @@ bool(false) Warning: stristr(): needle is not a string or an integer in %s on line %d bool(false) -- Iteration 11 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 16 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 17 -- Notice: Object of class sample could not be converted to int in %s on line %d + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 18 -- Warning: stristr(): needle is not a string or an integer in %s on line %d bool(false) -- Iteration 19 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) -- Iteration 20 -- + +Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) ===DONE=== diff --git a/ext/standard/tests/strings/strpos.phpt b/ext/standard/tests/strings/strpos.phpt index 0dd901a19d..c9c3453588 100644 Binary files a/ext/standard/tests/strings/strpos.phpt and b/ext/standard/tests/strings/strpos.phpt differ diff --git a/ext/standard/tests/strings/strpos_number.phpt b/ext/standard/tests/strings/strpos_number.phpt index 73da09500d..fd045c64d3 100644 --- a/ext/standard/tests/strings/strpos_number.phpt +++ b/ext/standard/tests/strings/strpos_number.phpt @@ -9,7 +9,10 @@ var_dump(strpos("foo bar", 111)); // string("11") is contained var_dump(strpos("foo 11", "11")); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d bool(false) + +Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d int(1) int(4) diff --git a/ext/standard/tests/strings/strrchr_variation1.phpt b/ext/standard/tests/strings/strrchr_variation1.phpt index 0cfcf25be1..7a8b3c9756 100644 Binary files a/ext/standard/tests/strings/strrchr_variation1.phpt and b/ext/standard/tests/strings/strrchr_variation1.phpt differ diff --git a/ext/standard/tests/strings/strrchr_variation10.phpt b/ext/standard/tests/strings/strrchr_variation10.phpt index 58677fa199..fc69a76b1a 100644 --- a/ext/standard/tests/strings/strrchr_variation10.phpt +++ b/ext/standard/tests/strings/strrchr_variation10.phpt @@ -132,22 +132,40 @@ echo "*** Done ***"; --EXPECTF-- *** Testing strrchr() function with unexpected inputs for needle *** -- Iteration 1 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 4 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 10 -- @@ -170,20 +188,34 @@ bool(false) Warning: strrchr(): needle is not a string or an integer in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 16 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 17 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 18 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 19 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 20 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 21 -- Notice: Object of class sample could not be converted to int in %s on line %d + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 22 -- bool(false) @@ -194,7 +226,11 @@ bool(false) Warning: strrchr(): needle is not a string or an integer in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 26 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -*** Done *** +*** Done *** \ No newline at end of file diff --git a/ext/standard/tests/strings/strrchr_variation11.phpt b/ext/standard/tests/strings/strrchr_variation11.phpt index f1d518dbae..b30ecbf242 100644 --- a/ext/standard/tests/strings/strrchr_variation11.phpt +++ b/ext/standard/tests/strings/strrchr_variation11.phpt @@ -91,22 +91,40 @@ echo "*** Done ***"; --EXPECTF-- *** Testing strrchr() function: with unexpected inputs for haystack and needle *** -- Iteration 1 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 4 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 10 -- @@ -129,31 +147,49 @@ NULL Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d NULL -- Iteration 15 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 16 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 17 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 18 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 19 -- Notice: Object of class sample could not be converted to int in %s on line %d + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 20 -- bool(false) -- Iteration 21 -- bool(false) -- Iteration 22 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 24 -- Warning: strrchr() expects parameter 1 to be string, resource given in %s on line %d NULL -- Iteration 25 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 26 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -*** Done *** +*** Done *** \ No newline at end of file diff --git a/ext/standard/tests/strings/strrchr_variation12.phpt b/ext/standard/tests/strings/strrchr_variation12.phpt index a17902604a..7ec5b830ba 100644 Binary files a/ext/standard/tests/strings/strrchr_variation12.phpt and b/ext/standard/tests/strings/strrchr_variation12.phpt differ diff --git a/ext/standard/tests/strings/strrchr_variation2.phpt b/ext/standard/tests/strings/strrchr_variation2.phpt index f5ec1259e7..46d7e99e5f 100644 --- a/ext/standard/tests/strings/strrchr_variation2.phpt +++ b/ext/standard/tests/strings/strrchr_variation2.phpt @@ -81,7 +81,7 @@ for($index=0; $index ---EXPECT-- +--EXPECTF-- *** Testing strrchr() function: with various single quoted strings *** -- Iteration 1 -- string(22) "lo123456he \x234 \101 " @@ -117,15 +117,23 @@ bool(false) string(5) "\101 " -- Iteration 12 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 16 -- @@ -213,8 +221,10 @@ bool(false) string(7) "4 \101 " -- Iteration 44 -- + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d string(37) "*+-./:;<=>?@hello123456he \x234 \101 " -- Iteration 45 -- string(63) "Hello,\t\n\0\n $&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 " -*** Done *** +*** Done *** \ No newline at end of file diff --git a/ext/standard/tests/strings/strrchr_variation8.phpt b/ext/standard/tests/strings/strrchr_variation8.phpt index 31a727ed6f..b1a2e8b33e 100644 --- a/ext/standard/tests/strings/strrchr_variation8.phpt +++ b/ext/standard/tests/strings/strrchr_variation8.phpt @@ -30,12 +30,16 @@ foreach($needles as $needle) { } echo "*** Done ***"; ?> ---EXPECT-- +--EXPECTF-- *** Testing strrchr() function: with heredoc strings *** bool(false) bool(false) + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d bool(false) bool(false) bool(false) -*** Done *** +*** Done *** \ No newline at end of file diff --git a/ext/standard/tests/strings/strripos_variation1.phpt b/ext/standard/tests/strings/strripos_variation1.phpt index 5eb2fdfe0c..9ba4091633 100644 --- a/ext/standard/tests/strings/strripos_variation1.phpt +++ b/ext/standard/tests/strings/strripos_variation1.phpt @@ -74,7 +74,7 @@ foreach ($needles as $needle) { } ?> ===DONE=== ---EXPECT-- +--EXPECTF-- *** Testing strripos() function: with double quoted strings *** -- Iteration 1 -- int(28) @@ -132,24 +132,56 @@ int(8) bool(false) int(8) -- Iteration 12 -- + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(8) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(8) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(8) -- Iteration 13 -- + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(8) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(8) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(8) -- Iteration 14 -- + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(8) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(8) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(8) -- Iteration 15 -- + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(8) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(8) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(8) -- Iteration 16 -- bool(false) @@ -251,4 +283,4 @@ int(0) bool(false) bool(false) int(0) -===DONE=== +===DONE=== \ No newline at end of file diff --git a/ext/standard/tests/strings/strripos_variation2.phpt b/ext/standard/tests/strings/strripos_variation2.phpt index d8caf73742..1711537d66 100644 --- a/ext/standard/tests/strings/strripos_variation2.phpt +++ b/ext/standard/tests/strings/strripos_variation2.phpt @@ -75,7 +75,7 @@ foreach ($needles as $needle) { } ?> ===DONE=== ---EXPECT-- +--EXPECTF-- *** Testing strripos() function: with single quoted strings *** -- Iteration 1 -- int(32) @@ -133,24 +133,56 @@ int(10) bool(false) int(10) -- Iteration 12 -- + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 16 -- bool(false) @@ -248,13 +280,21 @@ bool(false) bool(false) bool(false) -- Iteration 35 -- + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(23) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(23) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(23) + +Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d int(23) -- Iteration 36 -- int(0) bool(false) bool(false) int(0) -===DONE=== +===DONE=== \ No newline at end of file diff --git a/ext/standard/tests/strings/strrpos_variation1.phpt b/ext/standard/tests/strings/strrpos_variation1.phpt index 6f94bd84ca..88da3d8230 100644 --- a/ext/standard/tests/strings/strrpos_variation1.phpt +++ b/ext/standard/tests/strings/strrpos_variation1.phpt @@ -72,7 +72,7 @@ for($index=0; $index ---EXPECT-- +--EXPECTF-- *** Testing strrpos() function: with double quoted strings *** -- Iteration 1 -- int(28) @@ -108,16 +108,32 @@ int(9) int(8) bool(false) -- Iteration 12 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d int(8) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d int(8) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d int(8) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d int(8) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 16 -- bool(false) @@ -179,4 +195,4 @@ bool(false) -- Iteration 35 -- int(0) bool(false) -*** Done *** +*** Done *** \ No newline at end of file diff --git a/ext/standard/tests/strings/strrpos_variation10.phpt b/ext/standard/tests/strings/strrpos_variation10.phpt index 35119b0901..1fc97ad4bd 100644 --- a/ext/standard/tests/strings/strrpos_variation10.phpt +++ b/ext/standard/tests/strings/strrpos_variation10.phpt @@ -94,22 +94,40 @@ echo "*** Done ***"; --EXPECTF-- *** Testing strrpos() function with unexpected values for needle *** -- Iteration 1 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 4 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 10 -- @@ -132,31 +150,49 @@ bool(false) Warning: strrpos(): needle is not a string or an integer in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 16 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 17 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 18 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 19 -- Notice: Object of class sample could not be converted to int in %s on line %d + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 20 -- bool(false) -- Iteration 21 -- bool(false) -- Iteration 22 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 24 -- Warning: strrpos(): needle is not a string or an integer in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 26 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -*** Done *** +*** Done *** \ No newline at end of file diff --git a/ext/standard/tests/strings/strrpos_variation11.phpt b/ext/standard/tests/strings/strrpos_variation11.phpt index 84239b8f5e..a5d24220ea 100644 --- a/ext/standard/tests/strings/strrpos_variation11.phpt +++ b/ext/standard/tests/strings/strrpos_variation11.phpt @@ -91,31 +91,67 @@ echo "*** Done ***"; --EXPECTF-- *** Testing strrpos() function with unexpected values for haystack and needle *** -- Iteration 1 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 4 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 10 -- @@ -153,23 +189,43 @@ bool(false) Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 16 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 17 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 18 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 19 -- Notice: Object of class sample could not be converted to int in %s on line %d + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) Notice: Object of class sample could not be converted to int in %s on line %d + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 20 -- bool(false) @@ -178,10 +234,18 @@ bool(false) bool(false) bool(false) -- Iteration 22 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 24 -- @@ -191,9 +255,17 @@ bool(false) Warning: strrpos() expects parameter 1 to be string, resource given in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 26 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -*** Done *** +*** Done *** \ No newline at end of file diff --git a/ext/standard/tests/strings/strrpos_variation2.phpt b/ext/standard/tests/strings/strrpos_variation2.phpt index 2f4540f1c2..510f92ae0b 100644 --- a/ext/standard/tests/strings/strrpos_variation2.phpt +++ b/ext/standard/tests/strings/strrpos_variation2.phpt @@ -73,7 +73,7 @@ for($index=0; $index ---EXPECT-- +--EXPECTF-- *** Testing strrpos() function: with single quoted strings *** -- Iteration 1 -- int(32) @@ -109,16 +109,32 @@ bool(false) int(10) int(10) -- Iteration 12 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 16 -- bool(false) @@ -178,9 +194,13 @@ bool(false) bool(false) bool(false) -- Iteration 35 -- + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d int(23) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) -- Iteration 36 -- int(0) bool(false) -*** Done *** +*** Done *** \ No newline at end of file diff --git a/ext/standard/tests/strings/strrpos_variation7.phpt b/ext/standard/tests/strings/strrpos_variation7.phpt index 9c487d1e62..a6318add96 100644 --- a/ext/standard/tests/strings/strrpos_variation7.phpt +++ b/ext/standard/tests/strings/strrpos_variation7.phpt @@ -22,11 +22,15 @@ var_dump( strrpos($empty_string, NULL) ); echo "*** Done ***"; ?> ---EXPECT-- +--EXPECTF-- *** Testing strrpos() function: with heredoc strings *** -- With empty heredoc string -- bool(false) bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) + +Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d bool(false) *** Done *** \ No newline at end of file diff --git a/ext/standard/tests/strings/strstr.phpt b/ext/standard/tests/strings/strstr.phpt index a16cda9c93..f746b03079 100644 Binary files a/ext/standard/tests/strings/strstr.phpt and b/ext/standard/tests/strings/strstr.phpt differ