|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80059 Lowercase true/false should be used in code examples
Submitted: 2020-09-04 11:51 UTC Modified: 2020-09-04 12:26 UTC
From: t dot motylewski at gmail dot com Assigned:
Status: Verified Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-09-04 11:51 UTC] t dot motylewski at gmail dot com
From manual page:

According to PSR, boolean values should be written lowercase, eg.

$foo = false; 

and not 

$foo = FLASE;

Right now in many places in docs uppercase values are used, which confuses new users.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-09-04 12:00 UTC]
-Status: Open +Status: Verified
 [2020-09-04 12:00 UTC]
> According to PSR, […]

PSR is irrelevant for the code examples in the PHP manual, since
these are supposed to follow the PEAR CS[1]; however, PEAR CS also
mandates that true, false and null must always be lowercase[2].

[1] <>
[2] <>
 [2020-09-04 12:26 UTC] t dot motylewski at gmail dot com
Thanks for the quick verification.
Its quite surprising that docs are not using PSR. I've created a separate ticket for this topic
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Sep 28 18:03:37 2021 UTC