Re: PHP 7.1 - Address PHPSadness #28?
| From: | Rowan Collins | Date: | Wed, 23 Sep 2015 18:27:04 +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-88448@lists.php.net to get a copy of this message | ||
Lester Caine wrote on 23/09/2015 18:15:
On 23/09/15 17:37, Stig Bakken wrote:Actually that looks like what is currently being proposed as exists() - a swiss-army knife function based on isset() which is called as though you're examining the value. Instead of this: variable_exists($foo): yes (should be yes) unset($foo); variable_exists($foo): no (should be no) variable_exists($bar): no (should be no) My suggestion (with which I believe Stig was agreeing) is this: variable_exists('foo'): yes (should be yes) unset($foo); variable_exists('foo'): no (should be no) variable_exists('bar'): no (should be no)I'm still in favor of having a variable_exists('varname') function though.We had it ... https://bugs.php.net/bug.php?id=24274