Re: PHP and case-sensitivity inconsistency in PHP 6
Hi all,
On Mon, Jan 27, 2014 at 8:36 AM, Stas Malyshev <[email protected]>wrote:
> > So essentially, I would like to see case sensitivity at call time
> > (called name must match declaration), but case insensitivity at
> > declaration time (when checking whether a symbol has already been
> > declared):
>
> What would function_exists('Foo') return when foo() is defined?
>
> If false, then this code:
>
> if (!function_exists('Foo')) {
> function Foo() { ... }
> }
>
> would not work. If true, then this code:
>
> if(function_exists('Foo')) {
> Foo();
> }
>
> would not work. Both are working fine now and there's no real reason why
> shouldn't they keep working.
>
> Additionally, making the engine case-sensitive would simplify some areas
> of function/class handling. But making it inconsistently partially
> case-sensitive would instead complicate it, as we now would have to make
> additional checks against original name before calling.
>
> My opinion is if we go case-sensitive, it must be full case sensitivity,
> no exceptions.
+1 for full case sensitivity, no exceptions.
We may provide compatibility check and conversion scripts
using tokenizer module.
Regards,
--
Yasuo Ohgaki
[email protected]
Thread (15 messages)