php / doc-en

English PHP documentation
478 stars 709 forks source link

Error in Changelog for the function "hash" (php.net) #3480

Open mikuskov opened 1 month ago

mikuskov commented 1 month ago

Function: hash Changelog: 8.0.0 hash() now throws a ValueError exception if algo is unknown; previously, false was returned instead.

It is not true. Before version 8.0.0, it issues "Warning: hash(): Unknown hashing algorithm..."

tiffany-taylor commented 1 month ago

The warning is displayed, but false is actually what is returned from the function:
https://3v4l.org/KLEOa#v5.1.2 https://heap.space/xref/PHP-7.4/ext/hash/hash.c?r=d59aac58#132-133

Also, this issue should be in the doc-en repo, since it's an issue with the documentation. (I don't have requisite access to move the issue to the other repo, will have to be done by someone else)