Doc #79883 [Opn]: Documentation on foreach neglects to mention the alternate syntax.
| From: | cmb@php.net | Date: | Tue, 18 Aug 2020 13:37:19 +0000 |
| Subject: | Doc #79883 [Opn]: Documentation on foreach neglects to mention the alternate syntax. | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-17796@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79883&edit=1
ID: 79883
Updated by: cmb@php.net
Reported by: mark at manngo dot net
Summary: Documentation on foreach neglects to mention the
alternate syntax.
Status: Open
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
> Iâd be more than happy to write something and submit that. Ditto
> for the if page.
You can submit PRs to <https://github.com/php/doc-en>.
Previous Comments:
------------------------------------------------------------------------
[2020-07-22 08:41:51] mark at manngo dot net
Iâd be more than happy to write something and submit that. Ditto for the if page.
------------------------------------------------------------------------
[2020-07-22 08:30:15] cmb@php.net
Indeed, the alternative syntax is mentionend on the while, for,
and switch pages (apparently not on the if page), so might make
sense to add this info on the foreach page as well. I don't have
a strong feeling about either way.
------------------------------------------------------------------------
[2020-07-22 08:17:08] mark at manngo dot net
Possibly, but since the pages on while, for, if and switch all mention the alternative syntax, this
looks like an omission.
------------------------------------------------------------------------
[2020-07-22 07:28:44] cmb@php.net
There is a dedicated page for the alternative syntax of control
structures[1], and in my opinion, this is better than to mention
that again on all the other pages.
[1] <https://www.php.net/manual/en/control-structures.alternative-syntax.php>
------------------------------------------------------------------------
[2020-07-22 07:19:33] mark at manngo dot net
Description:
------------
---
From manual page: https://php.net/control-structures.foreach
---
Apart from a helpful comment, there is no mention of the alternate syntax for foreach.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79883&edit=1