Re: Proposal for PHP 7 : case-sensitive symbols
| From: | Yasuo Ohgaki | Date: | Sat, 24 Jan 2015 17:22:56 +0000 |
| Subject: | Re: Proposal for PHP 7 : case-sensitive symbols | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81084@lists.php.net to get a copy of this message | ||
Hi all,
On Sun, Dec 21, 2014 at 7:01 AM, F & N Laupretre <nf.laupretre@yahoo.fr>
wrote:
> I don't know if this was discussed before. So, tell me what you think
> before
> I write an RFC.
>
>
>
> I would like to propose that namespaces, functions, and classes become
> case-sensitive (constants are already case-sensitive). Actually, I never
> understood why they are case-insensitive. Even if the performance gain is
> negligible, I think it could be the right time to question this.
>
I'm writing this mail without reading current zend code.
Anyway, is it feasible to raise E_DEPRECATE without much performance
penalty?
For example,
if (!strcmp(name, name_to_be_searched)) {
do_something;
} else if (!strcasecmp(name, name_to_be_searched) {
rase_error;
do_something;
}
Duplicated codes may be removed by macro. strcasecmp() checks may be removed
10 years later or more.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net