|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: rknights at tripadvisor dot com
New email:
PHP Version: OS:


 [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: Thu Jul 25 17:01:27 2024 UTC