Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83275 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27520 invoked from network); 20 Feb 2015 08:38:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2015 08:38:09 -0000 Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.192.171 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.192.171 mail-pd0-f171.google.com Received: from [209.85.192.171] ([209.85.192.171:33401] helo=mail-pd0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/E6-25547-F62F6E45 for ; Fri, 20 Feb 2015 03:38:09 -0500 Received: by pdjz10 with SMTP id z10so6226070pdj.0 for ; Fri, 20 Feb 2015 00:38:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=vUAk5re82K++7zQPgtOX7cBVBGycxDBAU57P+q2RuHM=; b=ZGyOX0hloP0HWbv5diC2tRIYnyEXMCt/L7SawvAC5i3lhqDvJepx0uq5QYMKl01z4P bxaEHXIWV0Qal/26pCgjwXV5XLw7L/8EqBi3D3iQnLQc4JTgyAR8QvVKx0TW5c/wFHAA T7E7lqtb7RdhOX7yyiZovSw46CR8oE656pHypJfyrlTSv4177fjsT7Uv/2zcZ3bXf7j6 /L/eE4RSGwziWBomwDF6L94Lc7TiB2B/ae1/zTDxbchNrbJDHxWTR2PPtUwVXZSV9UOO ORTmOtdI6j28R+7k5mSoysqTC14XsYl7qvaPk1QZlJUq12469gWSQ+jTrvlO7nljJq5L dB5A== X-Gm-Message-State: ALoCoQko9xn6GpK1Ae8qi01A5e5r8h65eHnekHKUtEUpoVCZ+hVFy3bAgwMsJYyWxFApdNGsXluq MIME-Version: 1.0 X-Received: by 10.66.185.230 with SMTP id ff6mr14997657pac.102.1424421484614; Fri, 20 Feb 2015 00:38:04 -0800 (PST) Received: by 10.70.49.100 with HTTP; Fri, 20 Feb 2015 00:38:04 -0800 (PST) X-Originating-IP: [86.159.154.191] In-Reply-To: References: Date: Fri, 20 Feb 2015 08:38:04 +0000 Message-ID: To: Xinchen Hui Cc: PHP internals Content-Type: multipart/alternative; boundary=001a1134259a99e885050f80f80d Subject: Re: [PHP-DEV] [VOTE] Expectations From: pthreads@pthreads.org (Joe Watkins) --001a1134259a99e885050f80f80d Content-Type: text/plain; charset=UTF-8 The custom exception must derive from AssertionException, so the same optimization is possible. Cheers Joe On Fri, Feb 20, 2015 at 8:28 AM, Xinchen Hui wrote: > Hey: > > > > On Thu, Feb 19, 2015 at 5:09 PM, Joe Watkins > wrote: > > Morning internals, > > > > The expectations RFC is now in voting phase: > > https://wiki.php.net/rfc/expectations#vote > > sorry, the thread is too long to read.. I am not sure whether there > was some similar opinion before.. > > I voted without custom exception, that is because. > > if all assertion exception is AssertException, then we can simply > optimized them away while zend.assert is disabled.. > > like: > > try { > foo(); > bar(); > assert(); > } catch (AssertException $e) { > //these statements can be optimized away. > } > > but with custom exception.. > > try { > > sqllitefunc(); // no threw > sqllitefunc1(); //no threw > assert("", new SqlLiteException()); > } catch (SqlliteException $e) { > //we are not sure maybe sqllitefunc can throw SqliteException. > // thus we can not optimized these statements ayway > } > > thanks > > > > Cheers > > Joe > > > > -- > Xinchen Hui > @Laruence > http://www.laruence.com/ > --001a1134259a99e885050f80f80d--