php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68427 Associative arrays are limited to 32768 elements
Submitted: 2014-11-16 02:41 UTC Modified: 2014-11-16 04:23 UTC
From: rknights at tripadvisor dot com Assigned:
Status: Duplicate Package: Arrays related
PHP Version: 5.6.3 OS: Linux
Private report: No CVE-ID: None
 [2014-11-16 02:41 UTC] rknights at tripadvisor dot com
Description:
------------
An associative array that exceeds 32768 elements in length will be truncated.  Only the elements after 32768 will appear (i.e., the index rolls over).

Perhaps related to https://bugs.php.net/bug.php?id=68057

Evident in PHP 5.6.3 and 5.6.2; not present in PHP 5.3.x.



Test script:
---------------
http://filebin.ca/1hOFmcE7JwlX/big_array.php



Expected result:
----------------
Prints the length of the static array.  The expected length is 37260.  Prints 4492 (and throws an exception) on versions of PHP where the bug is present.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-16 04:23 UTC] requinix@php.net
-Status: Open +Status: Duplicate
 [2014-11-16 04:23 UTC] requinix@php.net
Same bug.

(mentioning bug #68057 for the automatic linking)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 12:01:31 2024 UTC