]> granicus.if.org Git - php/commitdiff
Deprecate non-string needles in string search functions
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 4 Jul 2018 21:16:05 +0000 (23:16 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 21 Jul 2018 20:34:09 +0000 (22:34 +0200)
Part of https://wiki.php.net/rfc/deprecations_php_7_3.

25 files changed:
ext/standard/string.c
ext/standard/tests/strings/stripos.phpt
ext/standard/tests/strings/stripos_variation1.phpt
ext/standard/tests/strings/stripos_variation10.phpt
ext/standard/tests/strings/stripos_variation11.phpt
ext/standard/tests/strings/stripos_variation15.phpt
ext/standard/tests/strings/stripos_variation2.phpt
ext/standard/tests/strings/stristr2.phpt
ext/standard/tests/strings/stristr_variation2.phpt
ext/standard/tests/strings/strpos.phpt
ext/standard/tests/strings/strpos_number.phpt
ext/standard/tests/strings/strrchr_variation1.phpt
ext/standard/tests/strings/strrchr_variation10.phpt
ext/standard/tests/strings/strrchr_variation11.phpt
ext/standard/tests/strings/strrchr_variation12.phpt
ext/standard/tests/strings/strrchr_variation2.phpt
ext/standard/tests/strings/strrchr_variation8.phpt
ext/standard/tests/strings/strripos_variation1.phpt
ext/standard/tests/strings/strripos_variation2.phpt
ext/standard/tests/strings/strrpos_variation1.phpt
ext/standard/tests/strings/strrpos_variation10.phpt
ext/standard/tests/strings/strrpos_variation11.phpt
ext/standard/tests/strings/strrpos_variation2.phpt
ext/standard/tests/strings/strrpos_variation7.phpt
ext/standard/tests/strings/strstr.phpt

index 792bd914e4dac2a5248af68b057dff7daa4b1106..4c603721c7ece59b56b3752226cc1a3cbde4ccb8 100644 (file)
@@ -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));
        }
 
index ef0efe5b236c8aa1c3ac9b27e2637f732b091a75..057b8ca494d79d84b9544ebea14325501000382c 100644 (file)
@@ -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
index ba02430c680b3b7d8cbbecc5a38c8cfe4e3c1f11..1494076586c0968bf6aaca91e21b5f4ee7ed61f6 100644 (file)
@@ -81,7 +81,7 @@ for($index=0; $index<count($needle); $index++) {
 }
 echo "*** Done ***";
 ?>
---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)
index 556428d47fa99b60031613ad67da64f61a70566a..70291c48a39babb5b9c82aa3d8d845bfe95c4251 100644 (file)
@@ -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 ***
index 0c8fd4a99dca2c4d678baf6101be8eabe7317069..d4fa84a6137d5cdbb8134cef254ef4ea32734ce4 100644 (file)
@@ -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)
index 51583edeb4a53691997e9aa4ea3481e9abcd3ec4..819baf08c41b11de64ba8a8ad01dd55f4fa9daef 100644 (file)
@@ -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)
index 97a9864509629b70058b203710a4dac6126c2e1d..bb77d1becb7c272cc4586f3a677570b0ede05087 100644 (file)
@@ -83,7 +83,7 @@ for($index=0; $index<count($needle); $index++) {
 }
 echo "*** Done ***";
 ?>
---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)
index 4b5ca494ac8394199b68bbce25ca29ff1b06e89e..b899b4739d9c7c869d4ca430ff93dde0187a91f0 100644 (file)
@@ -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"
index 651f048af6c542544dce3c2d3d55b74978a79a9b..644fe24b1014f38ec4a09ae7fec07973ea4f1c41 100644 (file)
@@ -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===
index 0dd901a19da3278e481a74bf9650b8c691ef5fbb..c9c34535886c85db50f6305f2e9a7e4659346106 100644 (file)
Binary files a/ext/standard/tests/strings/strpos.phpt and b/ext/standard/tests/strings/strpos.phpt differ
index 73da09500dfe47b92affb5f1426321a715c3af07..fd045c64d37fec7d0f437b20426ca375a6f1ad17 100644 (file)
@@ -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)
index 0cfcf25be1b68f77acd63af14490ece46a1c793c..7a8b3c97565914da1196059661e92ae31783cd55 100644 (file)
Binary files a/ext/standard/tests/strings/strrchr_variation1.phpt and b/ext/standard/tests/strings/strrchr_variation1.phpt differ
index 58677fa199ebe33210f7b2c7fb042ca22b71f581..fc69a76b1aa0b0e15f2d2fe863a52e5160539557 100644 (file)
@@ -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
index f1d518dbae76904d6ff5eb9b9191217e2a4860f7..b30ecbf2429176add3e8805226f6082d1e7c6858 100644 (file)
@@ -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
index a17902604a5c71190484e06695042b6367f06a9e..7ec5b830baf0281f147f2f9d78b77f5f131d3da8 100644 (file)
Binary files a/ext/standard/tests/strings/strrchr_variation12.phpt and b/ext/standard/tests/strings/strrchr_variation12.phpt differ
index f5ec1259e7f6996f9a971f5fef564de825a135bb..46d7e99e5f8e53c052c551c5e2bcd074a4330878 100644 (file)
@@ -81,7 +81,7 @@ for($index=0; $index<count($needle); $index++) {
 }
 echo "*** Done ***";
 ?>
---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
index 31a727ed6fbebfc55d45c8d350116f02fede922d..b1a2e8b33ea5552013c883bc475d7b02893d1d13 100644 (file)
@@ -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
index 5eb2fdfe0c10e6251853ebe8067acdf984140423..9ba4091633eff49581d37b4b7eb0f16db1359d7c 100644 (file)
@@ -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
index d8caf73742c72d95a9fe69b80376885bbf57df97..1711537d66959452f697b8aecf9c321527ce5dcf 100644 (file)
@@ -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
index 6f94bd84ca73c23166abdda49e36fba7fa8f37f4..88da3d823064a6c4235b2e09cb4f8741a72b23cf 100644 (file)
@@ -72,7 +72,7 @@ for($index=0; $index<count($needle); $index++) {
 }
 echo "*** Done ***";
 ?>
---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
index 35119b0901a21073a346173131a32288ad96d2f3..1fc97ad4bd4786f480fdfb8640826f5183e796f8 100644 (file)
@@ -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
index 84239b8f5ec1708cf79cbb58d093cf1fc1c0a7b8..a5d24220eacaf6e6d64d4db13a509849f97b2a86 100644 (file)
@@ -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
index 2f4540f1c259f444ae9bd2095a5b6aa076fb8254..510f92ae0b1f17f72405e4e2cfa26edb6b246fa8 100644 (file)
@@ -73,7 +73,7 @@ for($index=0; $index<count($needle); $index++) {
 }
 echo "*** Done ***";
 ?>
---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
index 9c487d1e62e4c3a44cec26c54c18417a330014c1..a6318add969a6c29d104adb4518fafcfc7c2b91a 100644 (file)
@@ -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
index a16cda9c9367d1a4dc5483691adfd61f22ff5509..f746b03079ec03e2256f56ed05602b69b3c16692 100644 (file)
Binary files a/ext/standard/tests/strings/strstr.phpt and b/ext/standard/tests/strings/strstr.phpt differ