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
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:
36 + 17 = ?
Subscribe to this entry?

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