php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #72415 PSR2 VS PHP.net
Submitted: 2016-06-15 14:57 UTC Modified: 2016-06-15 15:22 UTC
From: nicolas dot charvet at imie dot fr Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.6.22 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nicolas dot charvet at imie dot fr
New email:
PHP Version: OS:

 

 [2016-06-15 14:57 UTC] nicolas dot charvet at imie dot fr
Description:
------------
---
From manual page: http://www.php.net/language.variables.basics
---

Hello, 

the PSR2 seems asking to stop using the underscore in php variable declaration.
http://www.php-fig.org/psr/psr-2/#4-2-properties

But documentation php are always references .
http://php.net/manual/fr/language.variables.basics.php

What is the proper documentation ?

Thank you.

Nicolas.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-15 15:22 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2016-06-15 15:22 UTC] requinix@php.net
The documentation on php.net is official and gives information about what is and is not permitted by the PHP language. Leading underscores are permitted.

The PSRs are "best practice" coding style guides that are developed by the community. PSR-2 discourages the use of leading underscores for class properties.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Oct 26 05:01:24 2020 UTC