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
 [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 Mar 28 20:01:28 2024 UTC