Re: [PATCH] Notice on array to string convertion
| From: | Matthew Weier O'Phinney | Date: | Mon, 06 Jun 2011 13:36:59 +0000 |
| Subject: | Re: [PATCH] Notice on array to string convertion | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53021@lists.php.net to get a copy of this message | ||
On 2011-06-02, Patrick ALLAERT <patrickallaert@php.net> wrote:
> I would like to introduce an E_NOTICE when an array is silently
> converted to a string.
> This isn't very useful as it constantly produces the following string:
> "Array" and in most of the case, this is a sign of an error.
>
> Let me know about your feelings.
+1 (for E_NOTICE)
This allows warning folks easily during development of potential issues,
and for those of us using tools like PHPUnit, we'll catch the problem
early. At the same time, it doesn't break existing code.
--
Matthew Weier O'Phinney
Project Lead | matthew@zend.com
Zend Framework | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc