Skip to content

Commit e4df84a

Browse files
author
Thies C. Arntzen
committed
(serialize/unserialize) _sleep_() -> __sleep(), _wakeup_() -> __wakeup() rename.
1 parent 3092c10 commit e4df84a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

NEWS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ PHP 4.0 NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33

44
???, Version 4.0 Release Candidate 1
5+
- serialize()/unserialize() now call __sleep() and __wakeup() when
6+
working on objects. (Thies)
57
- Fixed a bug in the third argument to define()
68
- Added is_numeric() that returns true if the argument is a number
79
or a numeric string. (Andrei)
8-
- serialize()/unserialize() now call _sleep_() and _wakeup_() when
9-
working on objects. (Thies)
1010
- renamed to_string() method to _string_value_() for consistency.
1111
(Thies, Zend library)
1212
- domxml now supports libxml 2.0 Beta and drops support for older versions,

ext/standard/var.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ void php_var_serialize(pval *buf, pval **struc)
253253
CLS_FETCH();
254254

255255
MAKE_STD_ZVAL(fname);
256-
ZVAL_STRING(fname,"_sleep_",1);
256+
ZVAL_STRING(fname,"__sleep",1);
257257

258258
res = call_user_function_ex(CG(function_table), *struc, fname, &retval_ptr, 0, 0, 1);
259259

@@ -563,7 +563,7 @@ int php_var_unserialize(pval **rval, const char **p, const char *max)
563563
CLS_FETCH();
564564

565565
MAKE_STD_ZVAL(fname);
566-
ZVAL_STRING(fname,"_wakeup_",1);
566+
ZVAL_STRING(fname,"__wakeup",1);
567567

568568
call_user_function_ex(CG(function_table), *rval, fname, &retval_ptr, 0, 0, 1);
569569

0 commit comments

Comments
 (0)