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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
50 + 42 = ?
Subscribe to this entry?

 
 [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-2020 The PHP Group
All rights reserved.
Last updated: Fri Dec 04 17:01:23 2020 UTC