Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76874 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45183 invoked from network); 25 Aug 2014 22:54:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2014 22:54:41 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.169 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.217.169 mail-lb0-f169.google.com Received: from [209.85.217.169] ([209.85.217.169:37157] helo=mail-lb0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 51/00-45082-FAEBBF35 for ; Mon, 25 Aug 2014 18:54:40 -0400 Received: by mail-lb0-f169.google.com with SMTP id n15so426766lbi.0 for ; Mon, 25 Aug 2014 15:54:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9HMsPn2S8Hmor2ov7l2tAhWb6X4y9/yX8uFwPpFMWdY=; b=AzdqrSYJTci86TIsKY1fYLNql93Tl65v/K6qY9d3oClNSi1sJ/90NJw3DDlQz8CHBY ThsW0jZLG/0xlgejEbPRBAN7Nvs0C9IBAd+C10whHes1Lxy/fRacxxB01Ia7/3ZQaeVy d7ZNMbp5rDaKd3TJniFP8potHN0QZPrgoRYW5xcMKCjO1iFS4QZ4SoG4k9WLYCVZSh0W 9RjIvGkPNSxocczeOF/WWMZkAutwvtNoIiF78pMBaxxy4n1ts3Ytlq7GQFeu/g4khY59 AwTTnSMgbXoIM1Fxsrjz2AVAs37m6VVmd//XLJqWsRv//jQKJ5zYtMFsYxAkN6NOdzO3 nsYQ== MIME-Version: 1.0 X-Received: by 10.112.189.97 with SMTP id gh1mr22765837lbc.40.1409007276024; Mon, 25 Aug 2014 15:54:36 -0700 (PDT) Received: by 10.25.154.209 with HTTP; Mon, 25 Aug 2014 15:54:35 -0700 (PDT) In-Reply-To: <53FBAD09.1080108@sugarcrm.com> References: <53FB6D4C.9070705@php.net> <53FBAD09.1080108@sugarcrm.com> Date: Tue, 26 Aug 2014 00:54:35 +0200 Message-ID: To: Stas Malyshev Cc: Sebastian Bergmann , PHP internals Content-Type: multipart/alternative; boundary=001a11c36fd22c695b05017c12a9 Subject: Re: [PHP-DEV] Re: [VOTE] Abstract Syntax Tree From: nikita.ppv@gmail.com (Nikita Popov) --001a11c36fd22c695b05017c12a9 Content-Type: text/plain; charset=UTF-8 On Mon, Aug 25, 2014 at 11:39 PM, Stas Malyshev wrote: > Hi! > > > I don't know if I will be implementing that ext myself. In any case, > before > > that can happen I will have to create another RFC for converting parse > > errors into exceptions and making sure we don't leak memory on failed > parse > > If we're talking the plunge of putting exceptions into the core engine, > wouldn't it make sense to convert most of the fatal errors (especially > the "catchable" ones) to exceptions too? Most of them (except for out of > memory, timeouts and such) don't really require the engine to shut down, > as it seems... So if we're already saying people will have to deal with > exceptions in PHP engine anyway, maybe we could make it so that we could > have unified handling of them? > I was planning to deal with parse exceptions separately because they require special handling and larger changes to the parser. However I could also apply those changes independently, as they are also useful for avoiding leaks on failed eval()s. The actual exception can then be introduced together with other exceptions for fatal errors. Yeah, I think that's what I'm going to do, thanks for pointing this out :) Nikita PS: The AST branch is now merged into master. --001a11c36fd22c695b05017c12a9--