Doc #71458 [Opn->Csd]: foreach docs should expand upon the references warning

From: Date: Tue, 31 May 2016 17:00:16 +0000
Subject: Doc #71458 [Opn->Csd]: foreach docs should expand upon the references warning
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13482@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71458&edit=1 ID: 71458 Updated by: cmb@php.net Reported by: requinix@php.net Summary: foreach docs should expand upon the references warning -Status: Open +Status: Closed Type: Documentation Problem Package: Scripting Engine problem PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: In my opinion, neither automatically deferencing the loop variable before nor after the loop would fit to PHP's *function* scope of local variables. However, feel free to file a (separate) feature request. Previous Comments: ------------------------------------------------------------------------ [2016-05-31 16:55:12] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&revision=339246 Log: fix #71458: foreach docs should expand upon the references warning ------------------------------------------------------------------------ [2016-05-31 08:01:57] cronfy at gmail dot com > Another option though would be to change behavior (in next major) and deref foreach () > references at the end of the loop... This can break existing code - reference to last array item may be expected. But is it possible to deref foreach $value at the START of foreach? I think it should work fine. ------------------------------------------------------------------------ [2016-05-30 20:44:13] requinix@php.net Related To: Bug #72292 ------------------------------------------------------------------------ [2016-02-22 19:07:28] requinix@php.net Related To: Bug #71644 ------------------------------------------------------------------------ [2016-02-09 08:58:13] requinix@php.net Related To: Bug #71557 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=71458 -- Edit this bug report at https://bugs.php.net/bug.php?id=71458&edit=1

« previous php.doc.bugs (#13482) next »