On 8/31/23 13:34, Niels Dossche wrote:
Hi Tim

On 30/08/2023 13:43, Tim Düsterhus wrote:
Hi

after suggesting the use of ucfirst(strtolower(...)) casing for acronyms within 
a classname of a draft RFC, I was made aware of previous class naming RFC (June 
2017) that required the use of PascalCase for class names, with the exception 
of acronyms which must be completely uppercased:

https://wiki.php.net/rfc/class-naming

I'd like to propose to revisit this earlier decision for the following reasons. 
Before writing an RFC I'd like have some pre-discussion to gauge opinions.

--------------------

1. It is not consistently applied:
[...]

I think it's a good idea to change the rules to reality as much as possible.
Especially given that recent additions seem to follow what you're proposing.



I agree. Using uppercase for the first letter in an acronym and lowercase for subsequent letters appears to be prevalent in many userland libraries, so it seems to be what users expect.

Since class names in PHP aren't case-sensitive, there should be no BC concerns for changing existing classes to fit this new casing (for Reflection, debug, and documentation purposes). That is, if we wanted to also update all existing class names in PHP that contain acronyms (e.g., DOMDocument -> DomDocument, SimpleXMLElement -> SimpleXmlElement, etc.).

--
Cheers,
Ben

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to