Re: svn: /phpdoc/en/trunk/language/control-structures/ foreach.xml

From: Date: Mon, 13 Jun 2016 11:27:35 +0000
Subject: Re: svn: /phpdoc/en/trunk/language/control-structures/ foreach.xml
References: 1  Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-14179@lists.php.net to get a copy of this message
Hi Nikita! On 12.06.2016 at 17:50, Nikita Popov wrote: > nikic Sun, 12 Jun 2016 15:50:55 +0000 > > Revision: > http://svn.php.net/viewvc?view=revision&revision=339323 > > Log: > Remove lies from foreach docs > > The given code is valid since PHP 5.5 Wouldn't it be better to keep this info in the manual and to mark it as pre PHP 5.5 behavior? I'm pretty sure that we still have readers working with older PHP versions (even though these are no longer supported by php.net), and those might need the information. We also should consider to add a formal changelog section to the foreach manual page. If you agree, I can do the respective changes. > Changed paths: > U phpdoc/en/trunk/language/control-structures/foreach.xml > > Modified: phpdoc/en/trunk/language/control-structures/foreach.xml > =================================================================== > --- phpdoc/en/trunk/language/control-structures/foreach.xml 2016-06-12 11:11:50 UTC (rev > 339322) > +++ phpdoc/en/trunk/language/control-structures/foreach.xml 2016-06-12 15:50:55 UTC (rev > 339323) > @@ -110,21 +110,6 @@ > </informalexample> > </warning> > <para> > - Referencing <literal>$value</literal> is only possible if the iterated array can > be > - referenced (i.e. if it is a variable). The following code won't work: > - <informalexample> > - <programlisting role="php"> > -<![CDATA[ > -<?php > -foreach (array(1, 2, 3, 4) as &$value) { > - $value = $value * 2; > -} > -?> > -]]> > - </programlisting> > - </informalexample> > - </para> > - <para> > <note> > <para> > <literal>foreach</literal> does not support the ability to -- Christoph M. Becker

« previous php.doc.cvs (#14179) next »