diff options
Diffstat (limited to 'ext/standard/tests/strings/strrpos_variation10.phpt')
-rw-r--r-- | ext/standard/tests/strings/strrpos_variation10.phpt | 86 |
1 files changed, 20 insertions, 66 deletions
diff --git a/ext/standard/tests/strings/strrpos_variation10.phpt b/ext/standard/tests/strings/strrpos_variation10.phpt index b9b24b9cb1..440605d430 100644 --- a/ext/standard/tests/strings/strrpos_variation10.phpt +++ b/ext/standard/tests/strings/strrpos_variation10.phpt @@ -83,7 +83,11 @@ $needles = array ( $counter = 1; for($index = 0; $index < count($needles); $index ++) { echo "-- Iteration $counter --\n"; - var_dump( strrpos($haystack, $needles[$index]) ); + try { + var_dump( strrpos($haystack, $needles[$index]) ); + } catch (TypeError $e) { + echo $e->getMessage(), "\n"; + } $counter ++; } @@ -91,108 +95,58 @@ fclose($file_handle); //closing the file handle echo "*** Done ***"; ?> ---EXPECTF-- +--EXPECT-- *** 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) +int(42) -- Iteration 2 -- - -Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d -bool(false) +int(41) -- 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) +int(27) -- Iteration 6 -- - -Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d -bool(false) +int(21) -- 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) +int(28) -- Iteration 10 -- - -Warning: strrpos(): needle is not a string or an integer in %s on line %d -bool(false) +strrpos() expects parameter 2 to be string, array given -- Iteration 11 -- - -Warning: strrpos(): needle is not a string or an integer in %s on line %d -bool(false) +strrpos() expects parameter 2 to be string, array given -- Iteration 12 -- - -Warning: strrpos(): needle is not a string or an integer in %s on line %d -bool(false) +strrpos() expects parameter 2 to be string, array given -- Iteration 13 -- - -Warning: strrpos(): needle is not a string or an integer in %s on line %d -bool(false) +strrpos() expects parameter 2 to be string, array given -- Iteration 14 -- - -Warning: strrpos(): needle is not a string or an integer in %s on line %d -bool(false) +strrpos() expects parameter 2 to be string, array given -- Iteration 15 -- - -Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d -bool(false) +int(41) -- 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) +int(41) -- 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) +int(64) -- 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) +strrpos() expects parameter 2 to be string, resource given -- 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 *** |