Edit report at https://bugs.php.net/bug.php?id=65074&edit=1

 ID:                 65074
 Updated by:         ras...@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

Reply via email to