Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42375 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2629 invoked from network); 26 Dec 2008 07:14:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Dec 2008 07:14:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.46.29 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 74.125.46.29 yw-out-2324.google.com Received: from [74.125.46.29] ([74.125.46.29:30281] helo=yw-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/60-33750-86484594 for ; Fri, 26 Dec 2008 02:14:48 -0500 Received: by yw-out-2324.google.com with SMTP id 5so1979458ywb.83 for ; Thu, 25 Dec 2008 23:14:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=M9Dcl8r9tNsz/z6MGW9jgw5kGHmZ+gB0teUK/VnILRs=; b=ZugXdJ228fFwXJwtnxwAWlE04NYfgPL1qPfBIWaospKJKXeey0YBTIDNf10Y+bE48V 5pCoAzeaZXdM4F+AkVAwDYYtzPyTAdjhLO87KudbxjYu98pYkvNKhlqpdXhzvOETEctj oo4Vf+6VaNfB+2/t6POXXFioCOPwUKhNg2m6w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Mzitqh7+Y89erThNqJk9+J6EIz3Og3pBTgWMU0NcLFRDRdEby15BQzecQgNBavL8Iy CqdVMLhV7EljmdUGFtqBiquCE0Wq5j03vuAnfyfrLKWSQu6/NnxGHT316vea5bSxl9MH cQ1ep4CisAPnVxCdJc4gSQZMbfjxEjncamMHY= Received: by 10.100.168.18 with SMTP id q18mr6174972ane.7.1230275685733; Thu, 25 Dec 2008 23:14:45 -0800 (PST) Received: by 10.100.32.2 with HTTP; Thu, 25 Dec 2008 23:14:45 -0800 (PST) Message-ID: Date: Fri, 26 Dec 2008 10:14:45 +0300 To: "David Grudl" Cc: "PHP internals" In-Reply-To: <49543783.50309@grudl.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <49543783.50309@grudl.com> Subject: Re: [PHP-DEV] Tip for 5.3: exceptions in __toString and __autoload From: indeyets@gmail.com ("Alexey Zakhlestin") On Fri, Dec 26, 2008 at 4:46 AM, David Grudl wrote: > This code throws *Fatal error*: Method test::__toString() must not throw an > exception > > class Test1 > { > public function __toString() > { > throw new Exception; > } > } > > The same problem causes throwing exceptions in function __autoload. > > I think this behavior is against the logic of exceptions. Excellent feature > of PHP 5.3 would be to resolve this errors. regarging __autoload, everything is correct, actually, as throwing exception doesn't let engine to try other variants (which is counter-intuitive). it is perfectly fine to have several autoloaders enabled. regarding __toString(), I am not convinced that it is unresolvable. Someone with better understanding of engine should comment -- Alexey Zakhlestin http://www.milkfarmsoft.com/