summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/strrchr_variation10.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/strings/strrchr_variation10.phpt')
-rw-r--r--ext/standard/tests/strings/strrchr_variation10.phpt32
1 files changed, 12 insertions, 20 deletions
diff --git a/ext/standard/tests/strings/strrchr_variation10.phpt b/ext/standard/tests/strings/strrchr_variation10.phpt
index 478ac80300..1004a3d915 100644
--- a/ext/standard/tests/strings/strrchr_variation10.phpt
+++ b/ext/standard/tests/strings/strrchr_variation10.phpt
@@ -121,7 +121,11 @@ $needles = array (
$count = 1;
for($index = 0; $index < count($haystacks); $index++) {
echo "-- Iteration $count --\n";
- var_dump( strrchr($haystacks[$index], $needles[$index]) );
+ try {
+ var_dump( strrchr($haystacks[$index], $needles[$index]) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$count ++;
}
@@ -129,7 +133,7 @@ fclose($file_handle); //closing the file handle
echo "*** Done ***";
?>
---EXPECTF--
+--EXPECT--
*** Testing strrchr() function with unexpected inputs for needle ***
-- Iteration 1 --
string(1) "0"
@@ -150,25 +154,15 @@ string(2) "10"
-- Iteration 9 --
bool(false)
-- Iteration 10 --
-
-Warning: strrchr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 2 to be string, array given
-- Iteration 11 --
-
-Warning: strrchr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 2 to be string, array given
-- Iteration 12 --
-
-Warning: strrchr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 2 to be string, array given
-- Iteration 13 --
-
-Warning: strrchr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 2 to be string, array given
-- Iteration 14 --
-
-Warning: strrchr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 2 to be string, array given
-- Iteration 15 --
bool(false)
-- Iteration 16 --
@@ -188,9 +182,7 @@ bool(false)
-- Iteration 23 --
bool(false)
-- Iteration 24 --
-
-Warning: strrchr() expects parameter 2 to be string, resource given in %s on line %d
-NULL
+strrchr() expects parameter 2 to be string, resource given
-- Iteration 25 --
bool(false)
-- Iteration 26 --