[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/language/control-structures/_break.xml?=
From:       Pieter_Hordijk <peehaa () php ! net>
Date:       2018-07-27 10:52:29
Message-ID: svn-peehaa-1532688749-345401-151171601 () svn ! php ! net
[Download RAW message or body]

peehaa                                   Fri, 27 Jul 2018 10:52:29 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=345401

Log:
each is deprecated, should be removed from the page

https://bugs.php.net/bug.php?id=76673

Provided by anon

Changed paths:
    U   phpdoc/en/trunk/language/control-structures/break.xml

Modified: phpdoc/en/trunk/language/control-structures/break.xml
===================================================================
--- phpdoc/en/trunk/language/control-structures/break.xml	2018-07-26 15:33:23 UTC (rev 345400)
+++ phpdoc/en/trunk/language/control-structures/break.xml	2018-07-27 10:52:29 UTC (rev 345401)
@@ -22,7 +22,7 @@
 <![CDATA[
 <?php
 $arr = array('one', 'two', 'three', 'four', 'stop', 'five');
-while (list(, $val) = each($arr)) {
+foreach ($arr as $val) {
     if ($val == 'stop') {
         break;    /* You could also write 'break 1;' here. */
     }



-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic