|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-01-07 17:39 UTC] hanskrentel at yahoo dot de
Description: ------------ array_reverse has array as documented return type. while running var_dump(array_reverse(NULL)); it reported to me NULL. I think some documentation is missing here. Reproduce code: --------------- --- From manual page: function.array-reverse#Return Values --- Expected result: ---------------- array (Not that I personally would expect that, but the documentation). Actual result: -------------- null PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 04:00:02 2025 UTC |
According to the sources, then the only time array_reverse() would return NULL would also emit an E_WARNING in the 5.2 branch: 2696 if (Z_TYPE_PP(input) != IS_ARRAY) { 2697 php_error_docref(NULL TSRMLS_CC, E_WARNING, "The argument should be an array"); 2698 return; 2699 }