Curious about camelCased method names

47 views
Skip to first unread message

Colin Robinson

unread,
Oct 30, 2012, 5:28:15 PM10/30/12
to php...@googlegroups.com
I'm wondering why camelCase was chosen as the way to declare method names when every function in the PHP core uses under_scores. Is it a way differentiate the methods in userland from the methods in core or just a style preference? I'm curious of the reasoning.

justin

unread,
Oct 30, 2012, 5:37:32 PM10/30/12
to php...@googlegroups.com
Core *functions* use underscores. Core *classes* use camel case:

http://us2.php.net/manual/en/class.exception.php

--j

Lukas Kahwe Smith

unread,
Oct 30, 2012, 5:42:18 PM10/30/12
to php...@googlegroups.com
PSR-1/2 are essentially a result of surveying all of the member project CS and taking the common denominator. going down to the origins, afaik the reason is the Horde project, which was the role model for PEAR, which was the role model for ZF, which was the role model for Doctrine/Symfony.

regards,
Lukas Kahwe Smith
m...@pooteeweet.org



Reply all
Reply to author
Forward
0 new messages