php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #32713 array_pad() maximum 1048576 elements
Submitted: 2005-04-15 10:19 UTC Modified: 2005-04-16 01:41 UTC
From: per at computer dot org Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: per at computer dot org
New email:
PHP Version: OS:

 

 [2005-04-15 10:19 UTC] per at computer dot org
Description:
------------
This should be in the documentation - array_pad() accepts a maximum of 1048576 elements to be padded per call.  I got the following warning from array_pad(): 

Warning: array_pad(): You may only pad up to 1048576 elements at a time

Reproduce code:
---------------
php -r '$a=array_pad(array(),1048577,1);'


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-15 10:30 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

"It is possible to add most 1048576 elements at a time."
 [2005-04-16 01:41 UTC] aidan@php.net
This is 1024^2 or 2^20, perhaps we should document it as that so it doesn't seem so arbitrary.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Sep 07 23:00:02 2025 UTC