php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80570 Incorrect named argument name for the nested function
Submitted: 2020-12-31 22:24 UTC Modified: 2020-12-31 22:27 UTC
From: vasilii dot b dot shpilchin at gmail dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 8.0.0 OS:
Private report: No CVE-ID: None
 [2020-12-31 22:24 UTC] vasilii dot b dot shpilchin at gmail dot com
Description:
------------
---
From manual page: https://php.net/functions.arguments
---
Named arguments Example #14 got the error: "Unknown named parameter $num".

Instead of this:
array_fill(start_index: 0, num: 100, value: 50);

it should be this:
array_fill(start_index: 0, count: 100, value: 50);

Thank you!

Test script:
---------------
// Run this, see error then comment out the first call and run again
var_dump(array_fill(start_index: 0, num: 100, value: 50));
var_dump(array_fill(start_index: 0, count: 100, value: 50));


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-12-31 22:27 UTC] requinix@php.net
-Status: Open +Status: Verified -Package: Documentation problem +Package: *General Issues
 [2020-12-31 22:27 UTC] requinix@php.net
Related to bug #80477
 [2021-01-01 13:57 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=4f04bd50ed71039b89e2b9a5aba7e53e74cac4c6
Log: Fix #80570: Incorrect named argument name for the nested function
 [2021-01-01 13:57 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2021-01-01 21:23 UTC] mumumu@php.net
Automatic comment on behalf of mumumu@mumumu.org
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=157b2fab21e7e92d77996a097794eacd2c431927
Log: Fix #80570: Incorrect named argument name for the nested function
 [2021-01-03 02:56 UTC] girgias@php.net
Automatic comment on behalf of girgias
Revision: http://git.php.net/?p=doc/fr.git;a=commit;h=2e325888d6aa9d059f16edd206e627b7c84b65eb
Log: Fix #80570 in French translation
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 23:01:28 2024 UTC