Intermediate PHP
Q81 / 100

What is PHP's array_walk() function?

Correct! Well done.

Incorrect.

The correct answer is B) Applies a callback to each element of an array by reference, modifying the array in place

B

Correct Answer

Applies a callback to each element of an array by reference, modifying the array in place

Explanation

array_walk($arr, function(&$val, $key) { $val = strtoupper($val); }) modifies values in place. Return value is bool, not the modified array.

Progress
81/100