#50687 [Opn->Bgs]: array_reverse return values missing NULL
ID: 50687
Updated by: kalle@php.net
Reported By: hanskrentel at yahoo dot de
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: win
PHP Version: 5.2.12
New Comment:
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 }
Previous Comments:
------------------------------------------------------------------------
[2010-01-07 17:39:19] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50687&edit=1
Thread (5 messages)