Re: [RFC] unset(): return bool if the variable has existed

From: Date: Wed, 06 Mar 2013 21:34:15 +0000
Subject: Re: [RFC] unset(): return bool if the variable has existed
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hello,

On Wed, Mar 6, 2013 at 11:31 PM, Bob Weinand <[email protected]> wrote:
> false. It's like unset($setValue) && unset($undefined).
>
> I've clarified this in the RFC; thank you.
>
> Bob Weinand
>
> Am 06.03.2013 um 22:24 schrieb "Steve Clay" <[email protected]>:
>
>> On 3/6/13 4:10 PM, Bob Weinand wrote:
>>> https://wiki.php.net/rfc/unset_bool
>>
>> What's the return value of unset($setValue, $undefined) ?
>>
>>
>> Steve Clay
>> --
>> http://www.mrclay.org/
>>

Would it make more sense to return an array with keys the name of the
variables that were unset and the result for each of them? This way
one could better handle 'false' being returned.

I'm not sure if it's possible or not, I didn't had the time to check
out the patch.


Thanks
----
Florin Patan
https://github.com/dlsniper


Thread (21 messages)

« previous php.internals (#66503) next »