Doc #67005 [Ana->Csd]: foreach documentation incomplete?
| From: | cmb@php.net | Date: | Sun, 14 Jun 2015 20:26:05 +0000 |
| Subject: | Doc #67005 [Ana->Csd]: foreach documentation incomplete? | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-12427@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67005&edit=1
ID: 67005
Updated by: cmb@php.net
Reported by: afhole at gmail dot com
Summary: foreach documentation incomplete?
-Status: Analyzed
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The Serbian translation is marked as inactive since 2011[1];
therefore it is not available from the language chooser select
element.
Inactive translations are typically grossly out-dated, and should
be read with an eye on the English original (if at all). Reporting
bugs regarding out-dated man pages is not really useful, as there
are tools which easily allow to see which pages are not
up-to-date[2].
[1] <https://github.com/php/web-php/commit/4209d7deb87c1ddf57fd933c2b05e875d6c9971f>
[2] <http://doc.php.net/>
Previous Comments:
------------------------------------------------------------------------
[2014-04-16 00:08:29] dm@php.net
It is highly likely that Serbian documentation hasn't been updated for a while. The behavior
you're describing is the "default" and is valid. To learn more about how foreach
works, consult this answer by nikic@php.net: http://stackoverflow.com/a/14854568/424004
We will update the English documentation if it's missing some key notes.
------------------------------------------------------------------------
[2014-04-02 09:58:55] afhole at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/control-structures.foreach
---
The following note is missing from the EN docs:
"Unless the array is referenced, foreach operates on a copy of the specified array and not the
array itself. foreach has some side effects on the array pointer. Don't rely on the array
pointer during or after the foreach without resetting it."
Yet it is present on the Serbian docs: http://php.net/manual/sr/control-structures.foreach.php
Is this still the behaviour of foreach? It seems to be.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67005&edit=1