Lester Caine wrote on 23/09/2015 18:15:
On 23/09/15 17:37, Stig Bakken wrote:
I'm still in favor of having a variable_exists('varname') function though.
We had it ...
https://bugs.php.net/bug.php?id=24274


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)



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to