php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #46358 [IT] foreach with references needs unset
Submitted: 2008-10-21 19:44 UTC Modified: 2010-10-23 14:24 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: svenr at selfhtml dot org Assigned: cucinato (profile)
Status: Closed Package: Translation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: svenr at selfhtml dot org
New email:
PHP Version: OS:

 

 [2008-10-21 19:44 UTC] 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
?>



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-22 22:47 UTC] wiesemann@php.net
There is currently no German translation for foreach. (It was available, but isn't anymore) => Only IT translation might be affected.
 [2010-04-07 02:23 UTC] cucinato@php.net
-Assigned To: +Assigned To: cucinato
 [2010-10-23 13:01 UTC] kalle@php.net
-Type: Bug +Type: Documentation Problem
 [2010-10-23 14:24 UTC] kalle@php.net
-Status: Assigned +Status: Closed
 [2010-10-23 14:24 UTC] kalle@php.net
Closing this one as the foreach construct currently aren't translated anymore, this will be fixed once the file is re-translated.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 15:01:32 2024 UTC