Hi!
As this seem to require a RFC, here is it:
https://wiki.php.net/rfc/unset_bool
Please feedback,
Bob Weinand
What's the return value of unset($setValue, $undefined) ?
Steve Clay
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" steve@mrclay.org:
What's the return value of unset($setValue, $undefined) ?
Steve Clay
Hello,
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" steve@mrclay.org:
What's the return value of unset($setValue, $undefined) ?
Steve Clay
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
Florin
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.
If you need that much granularity, just call unset() individually for each
one...
Anthony
Hi!
As this seem to require a RFC, here is it:
https://wiki.php.net/rfc/unset_bool
Please feedback,
Bob Weinand
--
unset is not a function, but a language construct, and there is at least
one similar construct which doesn't return anything (eg. not returning
NULL, but syntax error when used in a return context): echo
--
Ferenc Kovács
@Tyr43l - http://tyrael.hu
Hi!
As this seem to require a RFC, here is it:
https://wiki.php.net/rfc/unset_bool
Please feedback,
Bob Weinand
--
unset is not a function, but a language construct, and there is at least
one similar construct which doesn't return anything (eg. not returning
NULL, but syntax error when used in a return context): echo
referring to "This removes also an inconsistency: the function's return
value is void, states the docs. It is until now the only function which has
no return value." especially.
--
Ferenc Kovács
@Tyr43l - http://tyrael.hu
On Wed, Mar 6, 2013 at 10:10 PM, Bob Weinand bobwei9@hotmail.com
wrote:Hi!
As this seem to require a RFC, here is it:
https://wiki.php.net/rfc/unset_bool
Please feedback,
Bob Weinand
--
unset is not a function, but a language construct, and there is at least
one similar construct which doesn't return anything (eg. not returning
NULL, but syntax error when used in a return context): echoreferring to "This removes also an inconsistency: the function's return
value is void, states the docs. It is until now the only function which has
no return value." especially.
Agreed. The RFC needs to be updated as to not mislead readers.
--
Ferenc Kovács
@Tyr43l - http://tyrael.hu
Hi!
As this seem to require a RFC, here is it:
I'm not a fan of this change, but if it's going to be discussed, the RFC
should include baseline and RFC change benchmarks.
Please feedback,
Bob Weinand