Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15304 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59812 invoked by uid 1010); 8 Mar 2005 04:57:52 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 58827 invoked by uid 1007); 8 Mar 2005 04:57:13 -0000 Message-ID: <20050308045713.58826.qmail@lists.php.net> To: internals@lists.php.net References: <20050307221330.17528.qmail@lists.php.net> <5.1.0.14.2.20050307183504.02d80b10@localhost> Date: Mon, 7 Mar 2005 20:57:15 -0800 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response X-Posted-By: 64.142.6.231 Subject: Re: [PHP-DEV] Using `throw` with expr or expr logic From: pollita@php.net ("Sara Golemon") > Nothing to ridicule but there's a good reason that currently throw is a > statement. It has to do with us not being able to clean up properly when > we're within an expression as far as memory leaks, reference counting and > other locks are concerned. > Ah, that makes perfect sense. With exit()/die() the request is ending so any mess can be cleaned up and tossed out. With a throw, there's every liklihood that execution is going to continue. > Theoretically your patch could be applied as it's not the worst thing > (there are other existing situations where such edge cases could be > triggered) but I think it's better to keep the current state. I'd also > have to check if there aren't actually real additional problems > (misbehaviors) that could occur. > I wouldn't doubt that there are real showstoppers hiding behind that behavior. Probably surmountable ones, but not as trivial as they first appeared when I was looking at it. > I must say that I am debating with myself on this issue as syntactically > it's nice but I'm worried of the implications. It requires some thorough > analysis. > Agreed. Syntacticly it'd be nice if throw were consistent in this regard, but it absolutely needs to be approached cautiously. -Sara