Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 749 Bytes

File metadata and controls

22 lines (19 loc) · 749 Bytes

map()

NAME

map - modify an mapping, array, or string via application of a function

SYNOPSIS

mapping map( mapping | mixed* | string x, string fun, object ob,
mixed extra, ... );
mapping map( mapping | mixed* | string x, function f, mixed extra, ... );

DESCRIPTION

If the first argument is a mapping, map() behaves exactly like map_mapping(). If it is an array, map() behaves exactly like map_array(). If it's argument is a string, map() passes each character (as an int) to the function, and replaces the character with the return value if the return value is a non-zero integer.

SEE ALSO

filter_array(), sort_array(), map_array(), map_mapping()