Quiz: PHP 8's Functional Additions

Test your understanding of newly added functions introduced in PHP 8.

1

Which operator is used in the code below?

declare(strict_types=1);
function sum(...$numbers): int {
   return array_sum($numbers);
}

echo sum(54, 76, 23, 65, 70, 10, 400);
A)

Concatenation operator

B)

Nested ternary operator

C)

Splat operator

D)

Nullsafe operator

Question 1 of 50 attempted

Get hands-on with 1200+ tech skills courses.