Applies an expression to each item in an array and returns an array with
the applied results.
public map ( mixed | self $input, string $as, mixed | self $in ) | ||
$input | mixed | self | An expression that resolves to an array. |
$as | string | The variable name for the items in the input array. The in expression accesses each item in the input array by this variable. |
$in | mixed | self | The expression to apply to each item in the input array. The expression accesses the item by its variable name. |