Doc #75276 [Com]: password_hash docs have \n that causes confusion

From: Date: Thu, 28 Sep 2017 15:06:15 +0000
Subject: Doc #75276 [Com]: password_hash docs have \n that causes confusion
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15005@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75276&edit=1 ID: 75276 Comment by: chris at sternal-johnson dot com Reported by: chris at sternal-johnson dot com Summary: password_hash docs have \n that causes confusion Status: Open Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Yes, it's a basic misunderstanding of PHP syntax. That said, in the comments, another high-rep SO PHP user states "Yeah I know. I've been in conversation with a few members here about it before." so it's more than one incident. Previous Comments: ------------------------------------------------------------------------ [2017-09-28 14:54:23] peehaa@php.net > This apparently causes some confusion to **users** I only see a single instance of a confused user who lacks understanding of basic syntax. Not sure whether this warrants the change tbh. ------------------------------------------------------------------------ [2017-09-28 14:49:47] chris at sternal-johnson dot com Description: ------------ --- From manual page: http://www.php.net/function.password-hash --- The password_hash documentation includes a code example with a \n character concatenated after the hashed password. echo password_hash("rasmuslerdorf", PASSWORD_DEFAULT)."\n"; This apparently causes some confusion to users, who think it's necessary. https://stackoverflow.com/questions/46471880/php-function-to-use-password-hash-hash-or-md5-depending-on-availability This example in the documentation would be just fine without the newline. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75276&edit=1

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