Skip to content

Commit

Permalink
add test for strptime(): return false on failure
Browse files Browse the repository at this point in the history
Closes #2583
  • Loading branch information
chancegarcia authored and sgolemon committed Jun 18, 2017
1 parent 192b2d8 commit d3c593a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ext/standard/tests/time/strptime_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ echo "\n-- Testing strptime() function with more than expected no. of arguments
$extra_arg = 10;
var_dump( strptime($date, $format, $extra_arg) );

echo "\n-- Testing strptime() function on failure --\n";
var_dump( strptime('foo', $format) );

?>
===DONE===
--EXPECTF--
Expand All @@ -51,5 +54,8 @@ NULL

Warning: strptime() expects exactly 2 parameters, 3 given in %s on line %d
NULL

-- Testing strptime() function on failure --
bool(false)
===DONE===

0 comments on commit d3c593a

Please sign in to comment.