Intermediate PHP
Q65 / 100

What is PHP's arrow function (fn)?

Correct! Well done.

Incorrect.

The correct answer is B) A concise closure syntax that implicitly captures outer variables by value

B

Correct Answer

A concise closure syntax that implicitly captures outer variables by value

Explanation

fn($x) => $x * $factor automatically captures $factor by value without use. Added in PHP 7.4.

Progress
65/100