php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #43067 array_diff doc error
Submitted: 2007-10-22 11:05 UTC Modified: 2007-10-22 11:16 UTC
From: oddsen84 at hotmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: win xp pro
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: oddsen84 at hotmail dot com
New email:
PHP Version: OS:

 

 [2007-10-22 11:05 UTC] oddsen84 at hotmail dot com
Description:
------------
Should not the array in the example start with 0 and not 1? This would be the standard would it not?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-22 11:16 UTC] rquadling@php.net
No.

The key to 'blue' is 1. This is what is reported.

If you were to add 'green' in front of 'blue', then the result would be ...

Array
(
   [2] => blue
)

 [2007-10-22 11:16 UTC] rquadling@php.net
Example is correct.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 05:01:27 2024 UTC