Doc #71713 [Opn->Csd]: Array_Key_exist is not recursive

From: Date: Wed, 28 Sep 2016 13:31:11 +0000
Subject: Doc #71713 [Opn->Csd]: Array_Key_exist is not recursive
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13948@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71713&edit=1 ID: 71713 Updated by: cmb@php.net Reported by: martin at wenhaston dot net Summary: Array_Key_exist is not recursive -Status: Open +Status: Closed Type: Documentation Problem Package: Arrays related Operating System: N/A PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Okay, I guess a respective note can't hurt, and there are other parts of the manual mentioning multidimensional arrays, so: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2016-09-28 13:27:02] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&revision=340229 Log: Fix #71713: Array_Key_exist is not recursive Provided by Nikolay Labinskiy. ------------------------------------------------------------------------ [2016-03-05 19:28:52] martin at wenhaston dot net While that may be so, I am asking that the documentation clarifies this point. ------------------------------------------------------------------------ [2016-03-05 18:04:18] cmb@php.net Well, PHP doesn't have multidimensional arrays; it's just that an array value can be an array. However, that doesn't mean that a key that exists in such an inner array belongs to the outer array. Therefore the documentation is not in error, in my opinion. ------------------------------------------------------------------------ [2016-03-04 19:01:06] martin at wenhaston dot net Description: ------------ The manual page for array_key_exists does not state in any form that array_key_exists DOES NOT WORK on multidimensional arrays. http://php.net/array_key_exists Test script: --------------- $array = ("horse","tree","card"); $array['guard']['dog'] = "wOOF"; if (array_key_exists("dog",$array)){ print "found!"; } else { print "Dog not found!"; } // Never finds array key dog. Only searches first level of array. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71713&edit=1

« previous php.doc.bugs (#13948) next »