Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update named-arguments@RkNjYva8o_jXp9suz5YdG.md #8138

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Named arguments in PHP, introduced with PHP 8.0, allow you to specify the values

```php
<?php
$a = array_fill(start_index: 0, num: 100, value: 50);
$a = array_fill(start_index: 0, count: 100, value: 50);
```

In this code snippet, the parameters are passed by their names ('start_index', 'num', 'value'), not by their order in the function definition.
In this code snippet, the parameters are passed by their names ('start_index', 'count', 'value'), not by their order in the function definition.

Visit the following resources to learn more:

- [@official@Named Arguments](https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments)
- [@official@Named Arguments](https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments)