Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72217 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55451 invoked from network); 4 Feb 2014 21:31:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2014 21:31:06 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.53 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.53 mail-la0-f53.google.com Received: from [209.85.215.53] ([209.85.215.53:60118] helo=mail-la0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/75-13782-91C51F25 for ; Tue, 04 Feb 2014 16:31:05 -0500 Received: by mail-la0-f53.google.com with SMTP id e16so6896103lan.40 for ; Tue, 04 Feb 2014 13:31:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=jvi0gjygddD5xfGhgf7g2jRliNNjf9herj4eav6OMmk=; b=jcKy5U4iSWMiuP8S/s5Ow3a2JcO+czLAR7/dJC8gBtpiP4tXImUdB9q2Uel0ZieV2W 7HJZMNe6pKEn1LXLpf4lKJrrhBs2mEKDFYRwPegCF3kBHgCFi/ni5OtuS3oz0aH9PPX/ f2ZYHgkL99PS+ufvtqFqcUVKP48swfotv0D8LK+JQGqPmmXlZS18xG/FgdTeJHzshlYS U5+499JHvsbE38Q7wky/8BswbC22r/qxv4e5gqurR5uNrepSpCDd/lFWLbCKU2bBmRxs hl+WYN2ysrf7k9W7uAX8qJYtA5Rfdn8FCnuyfggS/uV3KrbRkZ46n/vnKPLDdlwWgZ/x +5+g== X-Received: by 10.112.55.1 with SMTP id n1mr102684lbp.85.1391549462449; Tue, 04 Feb 2014 13:31:02 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.199.37 with HTTP; Tue, 4 Feb 2014 13:30:22 -0800 (PST) In-Reply-To: <52F157BE.3020804@ajf.me> References: <52EE2B66.4040005@pthreads.org> <52F157BE.3020804@ajf.me> Date: Wed, 5 Feb 2014 06:30:22 +0900 X-Google-Sender-Auth: WQ9glJuX3ydwWtgKWKjUWNovRv4 Message-ID: To: Andrea Faulds Cc: Sebastian Krebs , Joe Watkins , PHP internals Content-Type: multipart/alternative; boundary=001a11c3ae4265933004f19b5ba2 Subject: Re: [PHP-DEV] RE: RFC: expectations/assertions From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c3ae4265933004f19b5ba2 Content-Type: text/plain; charset=UTF-8 Hi Andrea, On Wed, Feb 5, 2014 at 6:12 AM, Andrea Faulds wrote: > On 04/02/14 21:09, Yasuo Ohgaki wrote: > >> It's inconsistent as closure is valid expression. >> Allowing callable make behavior consistent. It enables more >> complex assertion inline, thus it's possible name space clean. >> > > Might also help assert() performance, given that I expect executing a > closure to be quicker than eval() (though I may be wrong). eval() works. php > assert(eval('FALSE;')); Warning: assert(): Assertion failed in php shell code on line 1 php > assert(eval('return FALSE;')); Warning: assert(): Assertion failed in php shell code on line 1 php > However, it does not solve inconsistency. PHP code has to be string. Writing PHP code as string is not fun thing to do ;) Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c3ae4265933004f19b5ba2--