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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 19:01:35 2025 UTC