Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72218 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57824 invoked from network); 4 Feb 2014 21:43:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2014 21:43:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.46 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.216.46 mail-qa0-f46.google.com Received: from [209.85.216.46] ([209.85.216.46:33808] helo=mail-qa0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/D5-13782-F0F51F25 for ; Tue, 04 Feb 2014 16:43:43 -0500 Received: by mail-qa0-f46.google.com with SMTP id ii20so13004221qab.5 for ; Tue, 04 Feb 2014 13:43:40 -0800 (PST) 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=TTI4iugYVfpB2xWgheo6bXN6rUJt40xxR+kebpeU2Jg=; b=E7a3gzYYgS5ePlRUY+rsTdljeTo6z7BgXdHVYMTw/TJ7WUweimM23v5JXr5Pe/p2l1 EHqWhvbtdClw8WpX82j0NatKEJTbJNSgChzFsAAA/OrKKuuMvWche3Xh6VRaOtmhQ30H RlD6nDLLUZyxGxZNHvR5tRXOdLVZacC2fg20B93iD4X7nK7kfoFk3UOcH1RPGFVyA7sn fKrTFCrORMPTIHGTh6lGlw82Ra8qYmodFhlY3iFtgAbJgIeXfoJdkdE+oiiP8LZ7G32O APQ0X3U3syDE/qvW0I88QXBqUWZjvZq5ALGZ6zTQXKQMaQCV6QyGafxUUXQvm717KxFd T4FQ== MIME-Version: 1.0 X-Received: by 10.140.39.212 with SMTP id v78mr65837312qgv.77.1391550220402; Tue, 04 Feb 2014 13:43:40 -0800 (PST) Received: by 10.140.96.70 with HTTP; Tue, 4 Feb 2014 13:43:40 -0800 (PST) In-Reply-To: <52F15B62.1070006@gmail.com> References: <52EF4BF8.60005@sugarcrm.com> <52F14C66.3030806@gmail.com> <52F15B62.1070006@gmail.com> Date: Tue, 4 Feb 2014 22:43:40 +0100 Message-ID: To: Rowan Collins Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a11c1266293217c04f19b8864 Subject: Re: [PHP-DEV] Declare minimum PHP version required? From: tyra3l@gmail.com (Ferenc Kovacs) --001a11c1266293217c04f19b8864 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Feb 4, 2014 at 10:28 PM, Rowan Collins wro= te: > On 04/02/2014 21:04, Ferenc Kovacs wrote: > >> with the current assert implementation the assert is a function, which >> eval()-s the expression argument, but it will return early if asserts ar= e >> disabled(http://lxr.php.net/xref/PHP_5_5/ext/standard/assert.c#149) >> with the proposed assert (https://wiki.php.net/rfc/expectations) the >> assert will be changed into a language construct, which has the advantag= e >> that we can use expressions instead of passing a string for evaluation >> without additional cost, also executing that is cheaper than a function >> call, and when the assertions are disabled they will be almost zero-cost= . >> >> > Thanks for that. As posted elsewhere, I think the RFC could make that > clearer. > > So the relevance to this discussion is that you could already do a versio= n > check with an assert(), and the proposed version of assert() would be as > efficient as the proposed declare(); does that sound right? > > I would wait for Yasuo to answer, but that my understanding, yes. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a11c1266293217c04f19b8864--