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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
37 - 12 = ?
Subscribe to this entry?

 
 [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: Fri May 03 12:01:30 2024 UTC