Intermediate
PHP
Q47 / 100
What are named arguments in PHP 8?
Correct! Well done.
Incorrect.
The correct answer is B) Passing arguments by parameter name, allowing any order and skipping optional parameters
B
Correct Answer
Passing arguments by parameter name, allowing any order and skipping optional parameters
Explanation
array_slice(array: $arr, offset: 0, length: 3) uses named args. They improve readability and allow skipping middle optional parameters.
Progress
47/100