Skip to content

Commit

Permalink
Drop non-well formed numeric strings in strings function tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Girgias committed Jun 28, 2020
1 parent 956dde0 commit 76643cd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
Binary file modified ext/standard/tests/strings/strpos.phpt
Binary file not shown.
12 changes: 1 addition & 11 deletions ext/standard/tests/strings/substr_count_variation_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ echo "-- 3rd or 4th arg as string --\n";
$str = "this is a string";
var_dump( substr_count($str, "t", "5") );
var_dump( substr_count($str, "t", "5", "10") );
var_dump( substr_count($str, "i", "5t") );
var_dump( substr_count($str, "i", "5t", "10t") );

echo "\n-- 3rd or 4th arg as NULL --\n";
var_dump( substr_count($str, "I", NULL) );
Expand Down Expand Up @@ -49,20 +47,12 @@ var_dump(substr_count($str, "0"));
echo "Done\n";

?>
--EXPECTF--
--EXPECT--
*** Testing possible variations ***
-- 3rd or 4th arg as string --
int(1)
int(1)

Notice: A non well formed numeric value encountered in %s on line %d
int(2)

Notice: A non well formed numeric value encountered in %s on line %d

Notice: A non well formed numeric value encountered in %s on line %d
int(2)

-- 3rd or 4th arg as NULL --
int(0)
int(2)
Expand Down

0 comments on commit 76643cd

Please sign in to comment.