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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rknights at tripadvisor dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sun Oct 27 16:01:27 2024 UTC