Bug #60919 [Fbk]: __wakeup is not called
Edit report at https://bugs.php.net/bug.php?id=60919&edit=1
ID: 60919
Updated by: thekid@php.net
Reported by: thekid@php.net
Summary: __wakeup is not called
Status: Feedback
Type: Bug
Package: Scripting Engine problem
Operating System: (Any)
-PHP Version: 5.4.0RC6
+PHP Version: 5.4.0RC6+
Block user comment: N
Private report: N
New Comment:
But still occurs in php-5.4.0RC7-nts-Win32-VC9-x86 (2012-Feb-02 23:15:00)
Previous Comments:
------------------------------------------------------------------------
[2012-01-28 21:23:59] rasmus@php.net
I can't actually reproduce this in the current 5.4 code:
% php --version
PHP 5.4.0RC7-dev (cli) (built: Jan 28 2012 13:21:30)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
% php -r 'class A { function __sleep() { echo "SLEEP\n"; return array(); }
function __wakeup() { echo "WAKEUP"; }} $a= unserialize(serialize(new A()));'
SLEEP
WAKEUP
------------------------------------------------------------------------
[2012-01-28 20:58:08] thekid@php.net
Description:
------------
In 5.4.0RC6, a __wakeup() method is no longer called during unserialization.
Test script:
---------------
$ php -r 'class A { function __sleep() { echo "SLEEP\n"; return array(); } function
__wakeup() { echo "WAKEUP"; }} $a= unserialize(serialize(new A()));'
Expected result:
----------------
SLEEP
WAKEUP
object(A)#1 (0) {
}
Actual result:
--------------
SLEEP
object(A)#1 (0) {
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60919&edit=1
Thread (11 messages)
- thekid@php.net
- rasmus@php.netBug #60919 [Opn->Ctl]: __wakeup is not called
- rasmus@php.netBug #60919 [Ctl->Fbk]: __wakeup is not called
- thekid@php.netBug #60919 [Fbk]: __wakeup is not called
- thekid@php.netBug #60919 [Fbk]: __wakeup is not called
- thekid@php.netBug #60919 [PATCH]: __wakeup is not called
- rasmus@php.netBug #60919 [Fbk]: __wakeup is not called
- thekid@php.netBug #60919 [Fbk]: __wakeup is not called
- pajoye@php.netBug #60919 [Fbk->Dup]: __wakeup is not called
- pajoye@php.netBug #60919 [Dup->Fbk]: __wakeup is not called
- thekid@php.netBug #60919 [Fbk->Dup]: __wakeup is not called