Re: PHP 7.1 - Address PHPSadness #28?
| From: | Rowan Collins | Date: | Wed, 16 Sep 2015 21:23:25 +0000 |
| Subject: | Re: PHP 7.1 - Address PHPSadness #28? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-88265@lists.php.net to get a copy of this message | ||
On 16 September 2015 21:54:28 BST, Lester Caine <lester@lsces.co.uk> wrote:
> 'exists but I don't know what
>as yet' is a logical state
It is indeed. "I know it's name but it doesn't exist", however, is generally not
a valid state - if you've hard-coded the name (as is the case with 99.9% of bare variables)
then clearly you consider it to have some existence. For this reason, PHP assumes that you meant to
create it with a null value.
I seem to remember Perl has an interesting quirk along these lines where in some circumstances just
reading from a variable will actually initialise it in memory!
Regards,
--
Rowan Collins
[IMSoP]