[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-bugs
Subject:    [DOC-BUGS] Doc #60929 [Nab->ReO]: Serializable::unserialize() returns "void"
From:       aharvey () php ! net
Date:       2012-01-30 12:31:00
Message-ID: E1RrqNw-00036z-HB () sgrv2 ! php ! net
[Download RAW message or body]

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:             Not a bug
+Status:             Re-Opened
 Type:               Documentation Problem
 Package:            Documentation problem
 PHP Version:        Irrelevant
-Assigned To:        
+Assigned To:        aharvey
 Block user comment: N
 Private report:     N

 New Comment:

Actually, the return values section of that page is plain wrong too. The return 
value is actually ignored completely.

Reopening; will fix up.


Previous Comments:
------------------------------------------------------------------------
[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

-- 
PHP Documentation Bugs Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic