|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-06-02 01:01 UTC] rasmus@php.net
-Status: Open
+Status: Not a bug
[2013-06-02 01:01 UTC] rasmus@php.net
[2013-06-02 11:49 UTC] matteosistisette at gmail dot com
[2013-06-02 12:23 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 05:00:01 2025 UTC |
Description: ------------ The "Array to string conversion" notice message should at the very least include the name of the array variable that is being converted to string. A line of code may contain a lot of variables, so figuring out which one is the unexpected array can be a pain in the ass. Even the backtrace won't contain enough information since it only gives the line but not the position within the line. Test script: --------------- $string1="foo"; $string2="bar"; $string3=array("Whoops, this is an array"); $string4="bla bla"; echo $string1.$string2.$string3.$string4. Expected result: ---------------- PHP NOTICE at /path/to/file.php (6): Array to string conversion for variable 'string3' Actual result: -------------- PHP NOTICE at /path/to/file.php (6): Array to string conversion