Re: [PATCH] Notice on array to string convertion
| From: | Gustavo Lopes | Date: | Thu, 02 Jun 2011 11:57:35 +0000 |
| Subject: | Re: [PATCH] Notice on array to string convertion | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-52760@lists.php.net to get a copy of this message | ||
Em Thu, 02 Jun 2011 12:54:10 +0100, Hannes Magnusson <hannes.magnusson@gmail.com> escreveu:
On Thu, Jun 2, 2011 at 12:11, Patrick ALLAERT <patrickallaert@php.net> wrote:That's a much bigger BC break and can cause trouble because the elements of the array may not be convertible to strings. I support the E_NOTICE idea. -- Gustavo LopesI 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.How about making it useful rather then just throwing an notice? Recursive implode maybe? Or json/php serialized? :)