|  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
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

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

Test script:

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.


Add a Patch

Pull Requests

Add a Pull Request


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

(mentioning bug #68057 for the automatic linking)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 01 19:01:33 2024 UTC