svn: /phpdoc/en/trunk/reference/array/functions/ key.xml

From: Date: Thu, 27 Aug 2009 04:48:24 +0000
Subject: svn: /phpdoc/en/trunk/reference/array/functions/ key.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-4770@lists.php.net to get a copy of this message
torben Thu, 27 Aug 2009 04:48:24 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=287789 Log: Document the fact that key() returns NULL when the array pointer is out of bounds. Addresses Bug #47330. Bug: http://bugs.php.net/47330 (Open) key return value should be specified Changed paths: U phpdoc/en/trunk/reference/array/functions/key.xml Modified: phpdoc/en/trunk/reference/array/functions/key.xml =================================================================== --- phpdoc/en/trunk/reference/array/functions/key.xml 2009-08-27 04:22:21 UTC (rev 287788) +++ phpdoc/en/trunk/reference/array/functions/key.xml 2009-08-27 04:48:24 UTC (rev 287789) @@ -35,7 +35,11 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Returns the index. + The <function>key</function> function simply returns the + key of the array element that's currently being pointed to by the + internal pointer. It does not move the pointer in any way. If the + internal pointer points beyond the end of the elements list or the array is + empty, <function>key</function> returns &null;. </para> </refsect1> <refsect1 role="examples">

« previous php.doc.cvs (#4770) next »