Bug #65074 [Opn->Nab]: Array to string conversion

From: Date: Fri, 21 Jun 2013 07:32:54 +0000
Subject: Bug #65074 [Opn->Nab]: Array to string conversion
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-179670@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65074&edit=1 ID: 65074 Updated by: rasmus@php.net Reported by: ayalarcam at gmail dot com Summary: Array to string conversion -Status: Open +Status: Not a bug Type: Bug Package: *General Issues Operating System: All PHP Version: 5.4.16 Block user comment: N Private report: N New Comment: This is not a bug. These functions do not support nested arrays, so your nested [1,2] array is getting converted to the string "Array". This is exactly the kind of mistake this notice was meant to catch. Previous Comments: ------------------------------------------------------------------------ [2013-06-20 18:56:55] ayalarcam at gmail dot com Description: ------------ # Array to string conversion problem, in multiples functions show notice, (asort, array_diff, array_diff_assoc, etc.) Test script: --------------- $a = [1,2,3,4 => [1,2]]; $b = [1,3]; // show notice print_r(array_diff($a, $b)); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65074&edit=1

« previous php.bugs (#179670) next »