Doc #52878 [Com]: Incorrect return type

From: Date: Mon, 20 Sep 2010 10:42:16 +0000
Subject: Doc #52878 [Com]: Incorrect return type
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5086@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52878&edit=1 ID: 52878 Comment by: markskilbeck@php.net Reported by: jon at phpsitesolutions dot com Summary: Incorrect return type Status: Analyzed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Assigned To: markskilbeck Block user comment: N New Comment: Hi, Phillip. I wasn't aware that only the success value should be documented. Anyway, most of the documentation I've seen shows functions that return FALSE on failure and any other value on success as a mixed return. This makes sense to me. However, getMultiByKey does return FALSE only on error, it seems. Previous Comments: ------------------------------------------------------------------------ [2010-09-19 17:19:28] philip@php.net Technically it should be 'array' and not 'mixed' as otherwise every method/function in the manual would be 'mixed'. The prototype includes what may happen on success. That is, unless false is returned when no items are found (as opposed to some error or fail). I assume an empty array is returned in that case but if not then mixed is perfect. Either way, it could be clarified. ------------------------------------------------------------------------ [2010-09-19 15:35:54] markskilbeck@php.net I've updated the documentation to reflect your suggestion. ------------------------------------------------------------------------ [2010-09-19 14:48:12] markskilbeck@php.net Automatic comment from SVN on behalf of markskilbeck Revision: http://svn.php.net/viewvc/?view=revision&revision=303569 Log: #52878 - fixes return type ------------------------------------------------------------------------ [2010-09-18 06:21:49] jon at phpsitesolutions dot com Description: ------------ http://us.php.net/manual/en/memcached.getmultibykey.php The docs state that the return type is void (public void Memcached::getMultiByKey), but then in the actual return description, it states Array or False, which would be "mixed". This affects the overall docs page for Memcached, as well as the specific function description page. There are other occurrences such as this one in the Memcached docs as well.... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52878&edit=1

« previous php.doc.bugs (#5086) next »