Doc #66220 [Nab]: Class name case-sensitivity

From: Date: Tue, 03 Dec 2013 08:10:58 +0000
Subject: Doc #66220 [Nab]: Class name case-sensitivity
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10672@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66220&edit=1 ID: 66220 User updated by: info at websivu dot com Reported by: info at websivu dot com Summary: Class name case-sensitivity Status: Not a bug Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: You are right. Neither constants should be written using uppercase, but "By convention, constant identifiers are always uppercase". Source: http://php.net/manual/en/language.constants.php That's just a good practice and a styling issue, to use a capital letter in classes. Some kind of consistency in PHP manual's coding should be used. If the example is written explicitly to demonstrate that a class is not case sensitive, a comment should be added to that line. In my opinion, the manual should promote good coding habits or use some kind of standard: PSR-2 for example. Previous Comments: ------------------------------------------------------------------------ [2013-12-03 00:23:19] bjori@php.net Why? Class names are not case sensitive. ------------------------------------------------------------------------ [2013-12-02 18:38:29] info at websivu dot com Description: ------------ --- From manual page: http://www.php.net/language.oop5.visibility --- For typing convention/consistency, class instantiation in the example #2 should be written with a capital letter. Is now: $myFoo = new foo(); Should be: $myFoo = new Foo(); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66220&edit=1

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