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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
50 - 10 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 07:01:31 2024 UTC