Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54298 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17649 invoked from network); 2 Aug 2011 23:52:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Aug 2011 23:52:07 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 207.97.245.183 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.183 smtp183.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.183] ([207.97.245.183:56774] helo=smtp183.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/00-17431-4AD883E4 for ; Tue, 02 Aug 2011 19:52:05 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp48.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 717EC16869C; Tue, 2 Aug 2011 19:52:01 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp48.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 7B7B2168318; Tue, 2 Aug 2011 19:51:56 -0400 (EDT) Message-ID: <4E388D9B.80701@sugarcrm.com> Date: Tue, 02 Aug 2011 16:51:55 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Etienne Kneuss CC: "RQuadling@gmail.com" , PHP internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] asString() method vs __toString() magic method. From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! On 8/2/11 7:51 AM, Etienne Kneuss wrote: > The (historic) reason is that the toString conversion occurs at > various places in the engine, and in some of them, throwing exceptions > caused trouble. It is not clear whether this limitation it still > required. In any case, it could almost certainly be fixed. In theory, yes. In practice, that means ensuring every place in the engine that does convert_to_string() can be safely interrupted by an exception and can handle that exception properly. This is pretty hard to do. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227