# studlyCaps patch

- Thread: https://externals.io/message/4501
- Original archive: https://news-web.php.net/php.internals/4501
- Started by Andi Gutmans on 2003-09-16T19:37:40+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #4456 — Lukas Smith — 2003-09-12T11:29:04+00:00

URL: https://externals.io/message/4501#4456

> From: Marcus Börger [mailto:marcus.boerger@t-online.de]
> Sent: Friday, September 12, 2003 1:06 PM
 
>   after last discussion on this list regarding PHP's naming convention
for
> OOCode i took a deeper look at fixing my main concerns. That is error
> messages, backtraces and reflection show lowercased method names.
However
> this is easily changeable; with a minor performance decrease at
> compiletime
> when handling methods (not functions).
> 
> The attached patch now changes two files for two different purposes:
> 1) Zend/zend_compile.c, These changes allow to show the original
> function/method names in errors, backtraces and reflection. This works
for
> internal as well as for user functions/methods.
> 
> 2) Zend/zend_default_classes.c, changes the method names of the
internal
> exception class to studlyCaps naming convention.

> I think decision whether to incorporate this patch is up to Zeev and
Andi.

I am +1 on this obviously.

However it is important to note that this is also useful for userland
code, so I am +1 on this regardless of the php OO CS.

Regards,
Lukas

---

## #4501 — Andi Gutmans — 2003-09-16T19:37:40+00:00

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

I think this patch is fine.
I think (1) can be fixed quite easily. What do you mean when you say that 
(2) would result in a performance decrease? Would this only be in an error 
situation or also during regular runtime?

Andi

At 01:05 PM 9/12/2003 +0200, Marcus Börger wrote:
>Hello internals,
>
>   after last discussion on this list regarding PHP's naming convention for
>OOCode i took a deeper look at fixing my main concerns. That is error
>messages, backtraces and reflection show lowercased method names. However
>this is easily changeable; with a minor performance decrease at compiletime
>when handling methods (not functions).
>
>The attached patch now changes two files for two different purposes:
>1) Zend/zend_compile.c, These changes allow to show the original
>function/method names in errors, backtraces and reflection. This works for
>internal as well as for user functions/methods.
>
>2) Zend/zend_default_classes.c, changes the method names of the internal
>exception class to studlyCaps naming convention.
>
>The patches were already tested by some other developers and we found out
>thefollowing things:
>1) Some few error messsages show the new method name but should show the old
>method. For example when trying to override a final method the new name is
>shown instead of the old one which the message states.
>
>2) Errors for non existing functions are still shown lowercased. This could
>be changed too. But the performance decrease is higher so i wouldn't
>recommend that.
>
>I think decision whether to incorporate this patch is up to Zeev and Andi.
>
>--
>Best regards,
>  Marcus                          mailto:helly@php.net
