PHP - Array Functions
Identify the error in this PHP code using
array_map:$arr = [1, 2, 3];
$result = array_map('double', $arr);
function double($x) {
return $x * 2;
}
print_r($result);