|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50335 array_unshift can only run 1965 times
Submitted: 2009-11-30 15:11 UTC Modified: 2009-12-08 01:00 UTC
From: ryan at ongawari dot com Assigned:
Status: No Feedback Package: Arrays related
PHP Version: 5.3.1 OS: Win 2008
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-11-30 15:11 UTC] ryan at ongawari dot com
array_unshift can only run 1965 times

Reproduce code:
for ($i=0;$i<$numrows;++$i) {

Expected result:
To prepend the 2d array with a column that represents the row number of 
the 2D array

Actual result:
Apache crashes at line 1965 (when $i=1965)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-30 15:38 UTC] ryan at ongawari dot com

function addrownumbers(&$dataarray) {
	$numrows = count($dataarray);
	for ($i = 0; $i < $numrows; ++$i)



 [2009-11-30 16:04 UTC]
Please try using this snapshot:
For Windows:

The script provided works fine for me using latest SVN checkout.
 [2009-12-08 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 20 12:01:29 2024 UTC