Bug #52534 [Opn->Csd]: var_export array with negative key
| From: | felipe@php.net | Date: | Wed, 04 Aug 2010 23:12:14 +0000 |
| Subject: | Bug #52534 [Opn->Csd]: var_export array with negative key | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-153103@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52534&edit=1
ID: 52534
Updated by: felipe@php.net
Reported by: atila dot szekely at gmail dot com
Summary: var_export array with negative key
-Status: Open
+Status: Closed
Type: Bug
Package: Strings related
Operating System: Debian Lenny
PHP Version: 5.2.14
-Assigned To:
+Assigned To: felipe
Block user comment: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Fixed in 5.3 branch and trunk.
Previous Comments:
------------------------------------------------------------------------
[2010-08-05 01:11:46] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=301863
Log: - Fixed bug #52534 (var_export array with negative key)
------------------------------------------------------------------------
[2010-08-04 18:31:39] atila dot szekely at gmail dot com
Description:
------------
var_export is exporting negative array key as maxint (64 bit). Example:
-1 will be replaced with 18446744073709551615
Test script:
---------------
$aArray = array ( -1 => 'Hello', 1 => 'World');
$sExported = var_export($aArray,true);
echo $sExported;
Expected result:
----------------
array ( -1 => 'Hello',1 => 'World')
Actual result:
--------------
array ( 18446744073709551615 => 'Hello', 1 => 'World' )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52534&edit=1