Doc #80639 [PATCH]: [TR] foreach sample code getting error

From: Date: Wed, 26 May 2021 11:31:38 +0000
Subject: Doc #80639 [PATCH]: [TR] foreach sample code getting error
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18808@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80639&edit=1

 ID:                 80639
 Patch added by:     hallberg.kim@gmail.com
 Reported by:        guvenacar at hotmail dot com
 Summary:            [TR] foreach sample code getting error
 Status:             Verified
 Type:               Documentation Problem
 Package:            Translation problem
 Operating System:   windows
 PHP Version:        8.0.1
 Block user comment: N
 Private report:     N

 New Comment:

The following pull request has been associated:

Patch Name: [80639] Fix foreach sample code error
On GitHub:  https://github.com/php/doc-tr/pull/4
Patch:      https://github.com/php/doc-tr/pull/4.patch


Previous Comments:
------------------------------------------------------------------------
[2021-01-18 08:55:40] guvenacar at hotmail dot com

Description:
------------
---
From manual page: https://php.net/control-structures.foreach
---
Below code that in Turkish page, getting error when testing

Parse error: syntax error, unexpected token "=" in C:\xampp\htdocs\VSCodeTest\index.php on
line 4

Test script:
---------------
<?php
$dizi = array("bir", "iki", "üç");
foreach ($arr as &$value) {
    değer = değer * 2;
}
// $dizi şimdi array(2, 4, 6, 8)

// unset($değer) olmaksızın, $değer hala son öğeye gösterimli olur: $dizi[3]

foreach ($dizi as $key => $değer) {
    // $dizi[3] artık $dizi içindeki her değerle güncellenecek
    echo "{$key} => {$değer} ";
    print_r($dizi);
 }
// ...ikinciden son değere kadar son değere kopyalanacak.

// çıktı:
// 0 => 2 Array ( [0] => 2, [1] => 4, [2] => 6, [3] => 2 )
// 1 => 4 Array ( [0] => 2, [1] => 4, [2] => 6, [3] => 4 )
// 2 => 6 Array ( [0] => 2, [1] => 4, [2] => 6, [3] => 6 )
// 3 => 6 Array ( [0] => 2, [1] => 4, [2] => 6, [3] => 6 )
?>



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=80639&edit=1


Thread (4 messages)

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