php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76673 each is deprecated,shoul be removed from the page
Submitted: 2018-07-27 08:56 UTC Modified: 2018-07-27 10:53 UTC
From: bocance_alexandru_cristofor at yahoo dot com Assigned: peehaa (profile)
Status: Closed Package: Documentation problem
PHP Version: 7.2.8 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bocance_alexandru_cristofor at yahoo dot com
New email:
PHP Version: OS:

 

 [2018-07-27 08:56 UTC] bocance_alexandru_cristofor at yahoo dot com
Description:
------------
---
From manual page: http://php.net/manual/en/control-structures.break.php





Test script:
---------------
$arr = array('one', 'two', 'three', 'four', 'stop', 'five');
while (list(, $val) = each($arr)) {
    if ($val == 'stop') {
        break;    /* You could also write 'break 1;' here. */
    }
    echo "$val<br />\n";
}

Actual result:
--------------
<br />
<b>Deprecated</b>:  The each() function is deprecated. This message will be suppressed on further calls in <b>[...][...]</b> on line <b>3</b><br />
one<br />
two<br />
three<br />
four<br />


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-07-27 10:53 UTC] peehaa@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: peehaa
 [2018-07-27 10:53 UTC] peehaa@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-2025 The PHP Group
All rights reserved.
Last updated: Sun Mar 16 05:01:29 2025 UTC