summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/stripos_variation10.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/strings/stripos_variation10.phpt')
-rw-r--r--ext/standard/tests/strings/stripos_variation10.phpt30
1 files changed, 11 insertions, 19 deletions
diff --git a/ext/standard/tests/strings/stripos_variation10.phpt b/ext/standard/tests/strings/stripos_variation10.phpt
index 81d3b35a20..6792b4d0b2 100644
--- a/ext/standard/tests/strings/stripos_variation10.phpt
+++ b/ext/standard/tests/strings/stripos_variation10.phpt
@@ -83,7 +83,11 @@ $needles = array (
$counter = 1;
for($index = 0; $index < count($needles); $index ++) {
echo "\n-- Iteration $counter --\n";
- var_dump( stripos($haystack, $needles[$index]) );
+ try {
+ var_dump( stripos($haystack, $needles[$index]) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter ++;
}
@@ -122,29 +126,19 @@ bool(false)
int(17)
-- Iteration 10 --
-
-Warning: stripos() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 2 to be string, array given
-- Iteration 11 --
-
-Warning: stripos() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 2 to be string, array given
-- Iteration 12 --
-
-Warning: stripos() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 2 to be string, array given
-- Iteration 13 --
-
-Warning: stripos() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 2 to be string, array given
-- Iteration 14 --
-
-Warning: stripos() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 2 to be string, array given
-- Iteration 15 --
int(9)
@@ -174,9 +168,7 @@ bool(false)
bool(false)
-- Iteration 24 --
-
-Warning: stripos() expects parameter 2 to be string, resource given in %s on line %d
-NULL
+stripos() expects parameter 2 to be string, resource given
-- Iteration 25 --
bool(false)