Skip to content

Function: array_map() ​

array_map<T, U>(callback, array): U[]

Defined in: src/php-arrays.ts:48

Apply a callback to the elements of the given arrays.

Type Parameters ​

T ​

T

U ​

U

Parameters ​

callback ​

(value, index) => U

The callback function to apply

array ​

T[]

The array to map over

Returns ​

U[]

The mapped array

Documentation of 1.0.13 , built from cf61d3b on 1.0.13 by pipeline #2985011498 on 2026-10-21.