Re: Allow non-variable arguments to empty()
| From: | Richard Lynch | Date: | Sat, 05 May 2012 15:48:40 +0000 |
| Subject: | Re: Allow non-variable arguments to empty() | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-60466@lists.php.net to get a copy of this message | ||
On Tue, April 10, 2012 5:53 pm, Nikita Popov wrote:
> Another reason is that currently you get a very obscure error message
> if you try to use empty() on a function return value: "Can't use
> function return value in write context". Aha. Where did I try to write
> to the return value?!
On the line number indicated in the message :-)
More seriously, if the guts of PHP can easily detect when you are not
really write context versus this, just fix the error message to
something more meaningful.
--
brain cancer update:
http://richardlynch.blogspot.com/search/label/brain%20tumor
Donate:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE