Hi all,
On Thu, Jun 11, 2015 at 7:22 AM, Yasuo Ohgaki <[email protected]> wrote:
> I agree that NULL is debatable. In PHP, NULL is treated as 0/false by its
> context.
> It's simpler if we get rid of the behavior altogether. IMO.
>
If PHP should return NULL always against NULL variables, we may be better
to
reconsider these behavior.
[yohgaki@dev Download]$ php
<?php
$v = NULL;
$$v;
PHP Notice: Undefined variable: in - on line 3
[yohgaki@dev Download]$ php
<?php
$v = NULL;
$v();
PHP Fatal error: Uncaught EngineException: Function name must be a string
in -:3
Stack trace:
#0 {main}
thrown in - on line 3
[yohgaki@dev Download]$ php
<?php
$v = NULL;
$v[123]; // NULL
I don't care much whether these yield NULL always or raise error/exception,
but
there should be consistency.
Regards,
--
Yasuo Ohgaki
[email protected]