Doc #81299 [Com]: password_hash() documentation is missing PHP 8 changes

From: Date: Mon, 26 Jul 2021 09:57:11 +0000
Subject: Doc #81299 [Com]: password_hash() documentation is missing PHP 8 changes
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18992@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81299&edit=1 ID: 81299 Comment by: enumag at gmail dot com Reported by: enumag at gmail dot com Summary: password_hash() documentation is missing PHP 8 changes Status: Open Type: Documentation Problem Package: Documentation problem Operating System: any PHP Version: 8.0.8 Block user comment: N Private report: N New Comment: Also it seems that return value is not correctly documented for older PHP versions either. Documentation claims it returns string or false but if you pass an invalid algorithm it actually returns NULL on PHP 7.3 and 7.4. https://3v4l.org/vugc3 Previous Comments: ------------------------------------------------------------------------ [2021-07-26 09:48:42] enumag at gmail dot com Description: ------------ In PHP 8 password_hash seems to be change to always return string or throw an error. Meaning it can no longer return false on null. See https://3v4l.org/dtcXu This change however is not documented: https://www.php.net/manual/en/function.password-hash.php ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81299&edit=1

« previous php.doc.bugs (#18992) next »