From 02545895c1c6551be3b167bcada171fe9423d443 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 19 Feb 2014 23:49:31 +0200 Subject: Add compatibility layer for array_column(), array_replace(), array_replace_recursive() --- .../source/general/compatibility_functions.rst | 52 +++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) (limited to 'user_guide_src/source/general/compatibility_functions.rst') diff --git a/user_guide_src/source/general/compatibility_functions.rst b/user_guide_src/source/general/compatibility_functions.rst index 3495101ac..398403eda 100644 --- a/user_guide_src/source/general/compatibility_functions.rst +++ b/user_guide_src/source/general/compatibility_functions.rst @@ -183,4 +183,54 @@ Function reference :rtype: string For more information, please refer to the `PHP manual for - mb_substr() `_. \ No newline at end of file + mb_substr() `_. + +*************** +Array Functions +*************** + +This set of compatibility functions offers support for a few +standard `Array Functions `_ in PHP +that otherwise require a newer PHP version. + +Dependancies +============ + +- None + +Function reference +================== + +.. function:: array_column(array $array, $column_key[, $index_key = NULL]) + + :param array $array: Array to fetch results from + :param mixed $column_key: Key of the column to return values from + :param mixed $index_key: Key to use for the returned values + :returns: An array of values representing a single column from the input array + :rtype: array + + For more information, please refer to the `PHP manual for + array_column() `_. + +.. function:: array_replace(array $array1[, ...]) + + :param array $array1: Array in which to replace elements + :param array ...: Array (or multiple ones) from which to extract elements + :returns: Modified array + :rtype: array + + For more information, please refer to the `PHP manual for + array_replace() `_. + +.. function:: array_replace_recursive(array $array1[, ...]) + + :param array $array1: Array in which to replace elements + :param array ...: Array (or multiple ones) from which to extract elements + :returns: Modified array + :rtype: array + + For more information, please refer to the `PHP manual for + array_replace_recursive() `_. + + .. important:: Only PHP's native function can detect endless recursion. + Unless you are running PHP 5.3+, be careful with references! \ No newline at end of file -- cgit v1.2.3-24-g4f1b