Doc #60929 [ReO->Csd]: Serializable::unserialize() returns "void"

From: Date: Mon, 30 Jan 2012 12:40:18 +0000
Subject: Doc #60929 [ReO->Csd]: Serializable::unserialize() returns "void"
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7888@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60929&edit=1 ID: 60929 Updated by: aharvey@php.net Reported by: salsi at icosaedro dot it Summary: Serializable::unserialize() returns "void" -Status: Re-Opened +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Assigned To: aharvey Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2012-01-30 12:40:13] aharvey@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&revision=322932 Log: Fix doc bug #60929 (Serializable::unserialize() returns "void"). ------------------------------------------------------------------------ [2012-01-30 12:31:00] aharvey@php.net Actually, the return values section of that page is plain wrong too. The return value is actually ignored completely. Reopening; will fix up. ------------------------------------------------------------------------ [2012-01-30 02:43:18] frozenfire@php.net Serializable::unserialize() returns the unserialized object. Thus, the type is mixed, because the returned object can be of any class type. void would suggest that the call to unserialize() would not return any value. That would be the case if the syntax for unserialize() were unserialize($string, &$result). But, that's not the case. ------------------------------------------------------------------------ [2012-01-29 23:05:22] salsi at icosaedro dot it Description: ------------ --- From manual page: http://www.php.net/serializable.unserialize#refsect1-serializable.unserialize-returnvalues --- Serializable::unserialize() does not return "mixed", it does not return anything at all as one can see from the examples, because unserialize() is called instead of __construct(). The formal return type should then be "void". ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60929&edit=1

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