Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13826 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38243 invoked by uid 1010); 12 Nov 2004 01:47:41 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 38216 invoked from network); 12 Nov 2004 01:47:41 -0000 Received: from unknown (HELO newweb.akbkhome.com) (202.81.246.113) by pb1.pair.com with SMTP; 12 Nov 2004 01:47:41 -0000 Received: from [192.168.0.40] (helo=[192.168.0.40] ident=alan) by newweb.akbkhome.com with esmtp (Exim 4.33) id 1CSQbX-0002AK-3F for internals@lists.php.net; Fri, 12 Nov 2004 09:51:59 +0800 Message-ID: <419417E3.5020601@akbkhome.com> Date: Fri, 12 Nov 2004 09:54:43 +0800 User-Agent: Mozilla Thunderbird 0.8+ (X11/20041029) X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ACL-Warn: "cleared badlog" Subject: PHP5 __call() now requires __sleep/wakeup() ? From: alan@akbkhome.com (Alan Knowles) I got a message the other day, saying that my overloaded classes in PHP5 where not serializing. It appears that because PHP4 __call(), could return null to indicate that the function did not exist, a class without __sleep worked ok. However for PHP5, as __sleep is not defined, __call is sent the call, and just ignores it. i guess it's probably unfixable, but it's a big gotcha now. Possible fixes however a) dont call __call(), on magic methods? b) add a __call_not_handled() function or something to tell the processer that __call doesnt handle it.. c) leave as is? Regards Alan