From: Thies C. Arntzen Date: Sat, 18 Mar 2000 15:04:02 +0000 (+0000) Subject: (serialize/unserialize) _sleep_() -> __sleep(), _wakeup_() -> __wakeup() rename. X-Git-Tag: PHP-4.0-RC1~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e4df84a8da53541305ede98a697b0e43af6661eb;p=php (serialize/unserialize) _sleep_() -> __sleep(), _wakeup_() -> __wakeup() rename. --- diff --git a/NEWS b/NEWS index 9374f6697f..e26b8347fa 100644 --- a/NEWS +++ b/NEWS @@ -2,11 +2,11 @@ PHP 4.0 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ???, Version 4.0 Release Candidate 1 +- serialize()/unserialize() now call __sleep() and __wakeup() when + working on objects. (Thies) - Fixed a bug in the third argument to define() - Added is_numeric() that returns true if the argument is a number or a numeric string. (Andrei) -- serialize()/unserialize() now call _sleep_() and _wakeup_() when - working on objects. (Thies) - renamed to_string() method to _string_value_() for consistency. (Thies, Zend library) - domxml now supports libxml 2.0 Beta and drops support for older versions, diff --git a/ext/standard/var.c b/ext/standard/var.c index 5b4f5ab86d..c777ed4958 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -253,7 +253,7 @@ void php_var_serialize(pval *buf, pval **struc) CLS_FETCH(); MAKE_STD_ZVAL(fname); - ZVAL_STRING(fname,"_sleep_",1); + ZVAL_STRING(fname,"__sleep",1); res = call_user_function_ex(CG(function_table), *struc, fname, &retval_ptr, 0, 0, 1); @@ -563,7 +563,7 @@ int php_var_unserialize(pval **rval, const char **p, const char *max) CLS_FETCH(); MAKE_STD_ZVAL(fname); - ZVAL_STRING(fname,"_wakeup_",1); + ZVAL_STRING(fname,"__wakeup",1); call_user_function_ex(CG(function_table), *rval, fname, &retval_ptr, 0, 0, 1);