summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/stristr_variation2.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/strings/stristr_variation2.phpt')
-rw-r--r--ext/standard/tests/strings/stristr_variation2.phpt22
1 files changed, 9 insertions, 13 deletions
diff --git a/ext/standard/tests/strings/stristr_variation2.phpt b/ext/standard/tests/strings/stristr_variation2.phpt
index 8ca09db66c..fd842d1106 100644
--- a/ext/standard/tests/strings/stristr_variation2.phpt
+++ b/ext/standard/tests/strings/stristr_variation2.phpt
@@ -72,7 +72,11 @@ $pad_length = "20";
$count = 1;
foreach($inputs as $input) {
echo "-- Iteration $count --\n";
- var_dump( stristr("Hello World", $input) );
+ try {
+ var_dump( stristr("Hello World", $input) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$count ++;
}
@@ -97,17 +101,11 @@ bool(false)
-- Iteration 7 --
bool(false)
-- Iteration 8 --
-
-Warning: stristr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stristr() expects parameter 2 to be string, array given
-- Iteration 9 --
-
-Warning: stristr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stristr() expects parameter 2 to be string, array given
-- Iteration 10 --
-
-Warning: stristr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stristr() expects parameter 2 to be string, array given
-- Iteration 11 --
bool(false)
-- Iteration 12 --
@@ -131,9 +129,7 @@ bool(false)
-- Iteration 17 --
bool(false)
-- Iteration 18 --
-
-Warning: stristr() expects parameter 2 to be string, resource given in %s on line %d
-NULL
+stristr() expects parameter 2 to be string, resource given
-- Iteration 19 --
Warning: stristr(): Empty needle in %s on line %d