Bug #52534 [Com]: var_export array with negative key
| From: | cvp at banglagamer dot com | Date: | Thu, 13 Jan 2011 09:50:25 +0000 |
| Subject: | Bug #52534 [Com]: var_export array with negative key | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157879@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
Comment by: cvp at banglagamer dot com
Reported by: atila dot szekely at gmail dot com
Summary: var_export array with negative key
Status: Closed
Type: Bug
Package: Strings related
Operating System: Debian Lenny
PHP Version: 5.2.14
Assigned To: felipe
Block user comment: N
Private report: N
New Comment:
Will this be fixed in any 5.2.x branch?
Previous Comments:
------------------------------------------------------------------------
[2010-08-05 01:12:14] felipe@php.net
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.
------------------------------------------------------------------------
[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