php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54251 undocumented: isset checks multidimensional at each depth
Submitted: 2011-03-14 22:02 UTC Modified: 2011-04-26 22:03 UTC
From: lynch@php.net Assigned: salathe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: n/a
Private report: No CVE-ID: None
 [2011-03-14 22:02 UTC] lynch@php.net
Description:
------------
For years I've been using isset($foo[$x][$y]) to arbitrary depth and relying on it checking each array dimension in turn.

I've just now noticed that the documentation does not explicitly state that this depth-checking is a Feature.

It probably should be documented and given an example...


Test script:
---------------
<?php
	error_reporting(E_ALL);
	$foo[0] = 'This is not an array with a key of "value" to be used.';
	if (isset($foo[0]['value'])){
		echo "Right.";
	}
	else{
		echo "Wrong.";
	}
?>


Expected result:
----------------
I see what I expect to see, except the docs don't explicitly state that I've been doing it right for a decade :-)



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-26 22:02 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=310529
Log: add examples of 2nd/3rd array depths for isset() (doc #54251)
 [2011-04-26 22:03 UTC] salathe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: salathe
 [2011-04-26 22:03 UTC] salathe@php.net
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.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 18:00:02 2026 UTC