Doc #46358 [Asn->Csd]: [IT] foreach with references needs unset

From: Date: Sat, 23 Oct 2010 12:24:08 +0000
Subject: Doc #46358 [Asn->Csd]: [IT] foreach with references needs unset
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5367@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=46358&edit=1 ID: 46358 Updated by: kalle@php.net Reported by: svenr at selfhtml dot org Summary: [IT] foreach with references needs unset -Status: Assigned +Status: Closed Type: Documentation Problem Package: Translation problem PHP Version: Irrelevant Assigned To: cucinato Block user comment: N New Comment: Closing this one as the foreach construct currently aren't translated anymore, this will be fixed once the file is re-translated. Previous Comments: ------------------------------------------------------------------------ [2009-04-22 22:47:42] wiesemann@php.net There is currently no German translation for foreach. (It was available, but isn't anymore) => Only IT translation might be affected. ------------------------------------------------------------------------ [2008-10-21 19:44:14] svenr at selfhtml dot org Description: ------------ The german and italian translation of the foreach construct with reference variable have shortened the illustrative source code (or are outdated and based on an earlier version). Compare: http://de.php.net/manual/en/control-structures.foreach.php http://de.php.net/manual/de/control-structures.foreach.php http://de.php.net/manual/it/control-structures.foreach.php Reproduce code: --------------- The incomplete example in the german and italian version is: <?php $arr = array(1, 2, 3, 4); foreach ($arr as &$value) { $value = $value * 2; } // $arr vale ora array(2, 4, 6, 8) ?> Expected result: ---------------- The complete source code example in the english version is: <?php $arr = array(1, 2, 3, 4); foreach ($arr as &$value) { $value = $value * 2; } // $arr is now array(2, 4, 6, 8) unset($value); // break the reference with the last element ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=46358&edit=1

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