Hi,
On Tue, 2012-06-26 at 11:25 -0400, Anthony Ferrara wrote:
> https://wiki.php.net/rfc/password_hash
Some comments on the "error behavior" part:
E_WARNING - When CRYPT is not included in core (was disabled
compile-time, or is listed in disabled_functions declaration)
Disabling a different function should have no effect. This is not
intuitive. If crypt is a dependency and is not available this function
shouldn't be available either.
E_WARNING - When supplied an incorrect number of arguments.
E_WARNING - When supplied a non-string first parameter (password)
This should follow common semantics of zend_parse_parameters(... "s").
i.e. it has to support objects with __toString(). Also other scalars are
fine. (if they can be casted to string)
E_WARNING - If a non-string salt option is provided
As above.
If any error is raise, false is returned by the function.
In http://de.php.net/functions.internal it is documented that internal
functions return NULL on error during parameter parsing. New exceptions
for that should have a good reason.
These things are all minor and you might consider them bad, but then
change it globally, not by adding new inconsistencies.
johannes
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php