|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79883 Documentation on foreach neglects to mention the alternate syntax.
Submitted: 2020-07-22 07:19 UTC Modified: 2020-08-18 13:37 UTC
Avg. Score:2.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: mark at manngo dot net Assigned:
Status: Open Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-07-22 07:19 UTC] mark at manngo dot net
From manual page:

Apart from a helpful comment, there is no mention of the alternate syntax for foreach.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-07-22 07:28 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2020-07-22 07:28 UTC]
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] <>
 [2020-07-22 08:17 UTC] 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 08:30 UTC]
-Status: Not a bug +Status: Open
 [2020-07-22 08:30 UTC]
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:30 UTC]
-Status: Assigned +Status: Open -Assigned To: cmb +Assigned To:
 [2020-07-22 08:41 UTC] mark at manngo dot net
I’d be more than happy to write something and submit that. Ditto for the if page.
 [2020-08-18 13:37 UTC]
> I’d be more than happy to write something and submit that. Ditto
> for the if page.

You can submit PRs to <>.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Mar 02 14:01:34 2024 UTC