php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #14176 Missing $result in example
Submitted: 2001-11-22 08:49 UTC Modified: 2001-11-22 08:51 UTC
From: goral at unet dot pl Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.6 OS: any
Private report: No CVE-ID: None
 [2001-11-22 08:49 UTC] goral at unet dot pl
In array_merge example we have:
$array1 = array ("color" => "red", 2, 4);
$array2 = array ("a", "b", "color" => "green", "shape" => "trapezoid", 4);
array_merge ($array1, $array2);

But since array_merge returns an array it should look like this:
$array1 = array ("color" => "red", 2, 4);
$array2 = array ("a", "b", "color" => "green", "shape" => "trapezoid", 4);
$result = array_merge ($array1, $array2);

Just like in array_merge_recursive().

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-22 08:51 UTC] derick@php.net
Fixed in CVS. It will show up in a few days on the website.

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Sep 08 13:01:28 2024 UTC