Re: Re: [PATCH] Notice on array to string convertion
| From: | Stas Malyshev | Date: | Wed, 02 Nov 2011 16:27:14 +0000 |
| Subject: | Re: Re: [PATCH] Notice on array to string convertion | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56011@lists.php.net to get a copy of this message | ||
Hi!
What about array_diff(array("Array"), array(array()))? To me the sole act of having an array in it is an almost sure indication that the code is wrong somewhere... IMO it deserves a notice.That one would have the arrays different. Having multi-dimensonal arrays is not an error, comparing arrays of different structure is not an error either. Consider expression: "a" == array(). Is it an error? No, it's just a false expression. In the same way all comparisons where you compare string to array should just say it's not equal, since we know they're not equal. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227