php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36129 array_reduce() returns unexpected NULL
Submitted: 2006-01-23 02:59 UTC Modified: 2006-01-23 09:54 UTC
From: white_phoenix at ru dot ru Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 5.1.2 OS: all
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: white_phoenix at ru dot ru
New email:
PHP Version: OS:

 

 [2006-01-23 02:59 UTC] white_phoenix at ru dot ru
Description:
------------
array_reduce() returns unexpected NULL (PHP 5.0-5.1.2 only)

Reproduce code:
---------------
$array = array('value');
$result = array_reduce($array,'array_merge');
var_dump($result);

Expected result:
----------------
Works on PHP 4.4.0:
array(1) {
  [0]=>
  string(5) "value"
}

Actual result:
--------------
Tested on PHP 5.1.2:
NULL

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-23 09:54 UTC] tony2001@php.net
Ever heard about error_reporting(E_ALL)?
No bug here, this is expected.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 21:01:35 2025 UTC