diff options
author | Andrey Andreev <narf@devilix.net> | 2014-02-19 22:49:31 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-02-19 22:49:31 +0100 |
commit | 02545895c1c6551be3b167bcada171fe9423d443 (patch) | |
tree | 5b20681d01f237602d45f93d06ec59c772f19569 /user_guide_src/source/general | |
parent | e75255684d55fa075dcc7c03274c41201825d430 (diff) |
Add compatibility layer for array_column(), array_replace(), array_replace_recursive()
Diffstat (limited to 'user_guide_src/source/general')
-rw-r--r-- | user_guide_src/source/general/compatibility_functions.rst | 52 |
1 files changed, 51 insertions, 1 deletions
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() <http://php.net/mb_substr>`_.
\ No newline at end of file + mb_substr() <http://php.net/mb_substr>`_. + +*************** +Array Functions +*************** + +This set of compatibility functions offers support for a few +standard `Array Functions <http://php.net/book.array>`_ 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() <http://php.net/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() <http://php.net/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() <http://php.net/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 |