Re: PHP 7.1 - Address PHPSadness #28?
| From: | Rowan Collins | Date: | Wed, 16 Sep 2015 10:57:41 +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-88228@lists.php.net to get a copy of this message | ||
Lester Caine wrote on 16/09/2015 11:35:
If you are working with an array then fine, but we are talking about variables here not arrays. isset($i) is a local variable so 'which array is the variable is hiding in' applies?No, it's not hiding in any array, and I agree that array_key_exists() is not the right function to use. However, I have still yet to see any use case where it would be necessary or useful to detect - at runtime, rather than in static analysis for debugging - that $i has never been initialised, vs it having been initialised to null. Regards, -- Rowan Collins [IMSoP]