Re: [RFC] unset(): return bool if the variable has existed
| From: | Sebastian Krebs | Date: | Thu, 07 Mar 2013 08:45:53 +0000 |
| Subject: | Re: [RFC] unset(): return bool if the variable has existed | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-66516@lists.php.net to get a copy of this message | ||
2013/3/7 Stas Malyshev <smalyshev@sugarcrm.com>
> Hi!
>
> > RFC updated.
> >
> > Any other comments about this RFC?
>
> Could you provide a use case for this - which practical value this has?
>
> It also still contains factually incorrect claim that unset() is a
> function and that there's some "inconsistency" in the fact that it does
> not return value.
>
> Also, it is not clear what false returned from unset() actually means -
> did it fail to unset the value (i.e., it is still set)
Shouldn't this fail a little bit more obvious (-> "loud")? And how is this
even possible?
> or there was
> nothing to unset (i.e., it is still not set)?
>
So I guess this is the only useful behaviour. However, I have no idea, what
this information should tell me. If I call unset() then I want to ensure,
that the variable is not set anymore, but for what reason I should need to
know, whether it was set before, or not?
Regards,
Sebastian
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
github.com/KingCrunch