Doc #78072 [Opn->Fbk]: Wrong function call in the example.
| From: | cmb@php.net | Date: | Mon, 27 May 2019 10:32:10 +0000 |
| Subject: | Doc #78072 [Opn->Fbk]: Wrong function call in the example. | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-16684@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78072&edit=1
ID: 78072
Updated by: cmb@php.net
Reported by: mgarbowski at poczta dot fm
Summary: Wrong function call in the example.
-Status: Open
+Status: Feedback
Type: Documentation Problem
Package: Documentation problem
Operating System: irrelevant
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Is it about the Polish translation? This is not supposed to be
available anymore.
Previous Comments:
------------------------------------------------------------------------
[2019-05-27 09:31:31] mgarbowski at poczta dot fm
Description:
------------
---
From manual page: https://php.net/functions.arguments
---
In the example #17 there is defined translated name of a function (suma()) and when calling
it's used its English name (sum()).
====
PrzykÅad #17 DostÄp do zmiennej iloÅci argumentów w PHP 5.5 i starszych
<?php
function suma() {
$wynik = 0;
foreach (func_get_args() as $liczba) {
$wynik += $liczba;
}
return $wynik;
}
echo sum(1, 2, 3, 4);
?>
Test script:
---------------
<?php
//correct version:
function suma() {
$wynik = 0;
foreach (func_get_args() as $liczba) {
$wynik += $liczba;
}
return $wynik;
}
echo suma(1, 2, 3, 4);
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78072&edit=1