diff options
Diffstat (limited to 'user_guide_src/source')
-rw-r--r-- | user_guide_src/source/changelog.rst | 8 | ||||
-rw-r--r-- | user_guide_src/source/general/compatibility_functions.rst | 52 |
2 files changed, 58 insertions, 2 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9ec4d0d77..ccbb950af 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -508,7 +508,13 @@ Release Date: Not Released - Changed method ``clean_string()`` to utilize ``mb_convert_encoding()`` if it is available but ``iconv()`` is not. - Renamed method ``_is_ascii()`` to ``is_ascii()`` and made it public. - - Added `compatibility layers <general/compatibility_functions>` for PHP's `mbstring <http://php.net/mbstring>`_ (limited support), `hash <http://php.net/hash>`_ and `password <http://php.net/password>`_ extensions. + - Added `compatibility layers <general/compatibility_functions>` for: + + - `Multibyte String <http://php.net/mbstring>`_ (limited support). + - `Hash <http://php.net/hash>`_ (just ``hash_pbkdf2()``). + - `Password Hashing <http://php.net/password>`_. + - `Array Functions <http://php.net/book.array>`_ (``array_column()``, ``array_replace()``, ``array_replace_recursive()``). + - Removed ``CI_CORE`` boolean constant from *CodeIgniter.php* (no longer Reactor and Core versions). - Log Library will now try to create the **log_path** directory if it doesn't exist. - Added support for HTTP-Only cookies with new config option *cookie_httponly* (default FALSE). 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 |