php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80639 [TR] foreach sample code getting error
Submitted: 2021-01-18 08:55 UTC Modified: 2021-01-18 09:04 UTC
From: guvenacar at hotmail dot com Assigned:
Status: Verified Package: Translation problem
PHP Version: 8.0.1 OS: windows
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: guvenacar at hotmail dot com
New email:
PHP Version: OS:

 

 [2021-01-18 08:55 UTC] 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 )
?>


Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-01-18 09:04 UTC] requinix@php.net
-Summary: Sample code getting error +Summary: [TR] foreach sample code getting error -Status: Open +Status: Verified -Package: *Spelling functions +Package: Translation problem
 [2021-05-26 11:31 UTC] hallberg dot kim at gmail dot com
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
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 13:01:29 2024 UTC