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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 01:01:28 2024 UTC