summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/strrchr_variation11.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/strings/strrchr_variation11.phpt')
-rw-r--r--ext/standard/tests/strings/strrchr_variation11.phpt94
1 files changed, 24 insertions, 70 deletions
diff --git a/ext/standard/tests/strings/strrchr_variation11.phpt b/ext/standard/tests/strings/strrchr_variation11.phpt
index 108ba2e0f2..79ffe4c2ec 100644
--- a/ext/standard/tests/strings/strrchr_variation11.phpt
+++ b/ext/standard/tests/strings/strrchr_variation11.phpt
@@ -80,7 +80,11 @@ $values = array (
$counter = 1;
for($index = 0; $index < count($values); $index ++) {
echo "-- Iteration $counter --\n";
- var_dump( strrchr($values[$index], $values[$index]) );
+ try {
+ var_dump( strrchr($values[$index], $values[$index]) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter ++;
}
@@ -88,108 +92,58 @@ fclose($file_handle); //closing the file handle
echo "*** Done ***";
?>
---EXPECTF--
+--EXPECT--
*** 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)
+string(1) "0"
-- Iteration 2 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(1) "1"
-- Iteration 3 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(5) "12345"
-- Iteration 4 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(5) "-2345"
-- Iteration 5 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(4) "10.5"
-- Iteration 6 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(5) "-10.5"
-- Iteration 7 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(10) "1234567000"
-- Iteration 8 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(4) "1E-9"
-- Iteration 9 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(3) "0.5"
-- Iteration 10 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
-- Iteration 11 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
-- Iteration 12 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
-- Iteration 13 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
-- Iteration 14 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
-- Iteration 15 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(1) "1"
-- 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)
+string(1) "1"
-- 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)
+string(6) "object"
-- 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
+strrchr() expects parameter 1 to be string, resource given
-- 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 ***