# camelCase on Exception methods?

- Thread: https://externals.io/message/64187
- Original archive: https://news-web.php.net/php.internals/64187
- Started by Kris Craig on 2012-12-07T00:34:08+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #64187 — Kris Craig — 2012-12-07T00:34:08+00:00

URL: https://externals.io/message/64187#64187

Hey guys,

Please forgive me if this has already been addressed, but could somebody
tell me why all the methods for the Exception class are in camelCase?  I
don't want to wade too deeply into the "consistency vs. BC" rabbit hole
here, but I'm just wondering what the general consensus is on this right
now.

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


Thanks!

--Kris

---

## #64188 — Matthew Fonda — 2012-12-07T00:50:26+00:00

URL: https://externals.io/message/64187#64188 · In reply to: #64187

> Hey guys,
>
> Please forgive me if this has already been addressed, but could somebody
> tell me why all the methods for the Exception class are in camelCase?  I
> don't want to wade too deeply into the "consistency vs. BC" rabbit hole
> here, but I'm just wondering what the general consensus is on this right
> now.
>
> http://php.net/manual/en/class.exception.php
>
>
> Thanks!
>
> --Kris
>

Hi Kris,

See http://lxr.php.net/xref/PHP_TRUNK/CODING_STANDARDS#137

Best regards,
--Matthew

---

## #64189 — Sherif Ramadan — 2012-12-07T00:57:52+00:00

URL: https://externals.io/message/64187#64189 · In reply to: #64187

> Hey guys,
>
> Please forgive me if this has already been addressed, but could somebody
> tell me why all the methods for the Exception class are in camelCase?  I
> don't want to wade too deeply into the "consistency vs. BC" rabbit hole
> here, but I'm just wondering what the general consensus is on this right
> now.
>
> http://php.net/manual/en/class.exception.php
>
>
> Thanks!
>
> --Kris
>


This seems to be the case for pretty all classes I can see in core with the
exception of MySQLi (being that it tried to mimic the old mysql functions).
Obviously, class/method/function names are all case-insensitive throughout
PHP itself, but the documentation seems to be consistent in the use of
camel case.

The following class methods are all documented in camel-case throughout the
docs:

Exception
ExceptionError
DateTime
DateTimeZone
DateInterval
PDO
PDOStatement
(All of the Intl classes)
Collator
NumberFormatter
Locale
Normalizer
MessageFormatter
IntlDateFormatter
ResourceBundle
SpoofChecker
Transliterator
tidy
tidyNode
Phar
PharData
PharFileInfo
PharException
DomDocument (and friends)


Not an exhaustive list, but just at first glance.

---

## #64190 — Kris Craig — 2012-12-07T01:06:56+00:00

URL: https://externals.io/message/64187#64190 · In reply to: #64189

On Thu, Dec 6, 2012 at 4:57 PM, Sherif Ramadan <theanomaly.is@gmail.com>wrote:

> 
>
> > […]
>
>
> This seems to be the case for pretty all classes I can see in core with
> the exception of MySQLi (being that it tried to mimic the old mysql
> functions). Obviously, class/method/function names are all case-insensitive
> throughout PHP itself, but the documentation seems to be consistent in the
> use of camel case.
>
> The following class methods are all documented in camel-case throughout
> the docs:
>
> Exception
> ExceptionError
> DateTime
> DateTimeZone
> DateInterval
> PDO
> PDOStatement
> (All of the Intl classes)
> Collator
> NumberFormatter
> Locale
> Normalizer
> MessageFormatter
> IntlDateFormatter
> ResourceBundle
> SpoofChecker
> Transliterator
> tidy
> tidyNode
> Phar
> PharData
> PharFileInfo
> PharException
> DomDocument (and friends)
>
>
> Not an exhaustive list, but just at first glance.
>
>
Ahh ok, that answered my question!  I never really noticed that until now
for some reason....

Thanks!

--Kris
