|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22195 array_reduce of single-element array returns nothing
Submitted: 2003-02-12 18:38 UTC Modified: 2003-02-12 18:45 UTC
From: joergland at debian dot org Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 4.2.3 OS: Debian GNU/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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: joergland at debian dot org
New email:
PHP Version: OS:


 [2003-02-12 18:38 UTC] joergland at debian dot org
sample code:

$foo = array('a');
function r($a, $b) { return $a . $b; }
$str = array_reduce($foo, 'r');

$str is empty after execution, should be 'a'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-12 18:40 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

This works fine with PHP 4.3.1-dev, propably works
with PHP 4.3.0 too.

 [2003-02-12 18:45 UTC] joergland at debian dot org
sorry, my fault, i reported to fast ;-/
that's actually not a bug in PHP but in my brain

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Jul 05 08:03:34 2022 UTC