php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #78072 Wrong function call in the example.
Submitted: 2019-05-27 09:31 UTC Modified: 2019-06-09 04:22 UTC
From: mgarbowski at poczta dot fm Assigned: cmb (profile)
Status: No Feedback Package: Documentation problem
PHP Version: Irrelevant OS: irrelevant
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-05-27 09:31 UTC] 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);
?>



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-05-27 10:32 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2019-05-27 10:32 UTC] cmb@php.net
Is it about the Polish translation?  This is not supposed to be
available anymore.
 [2019-06-09 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 23:01:26 2024 UTC