Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72212 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45970 invoked from network); 4 Feb 2014 21:10:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2014 21:10:40 -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.217.171 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.171 mail-lb0-f171.google.com Received: from [209.85.217.171] ([209.85.217.171:58124] helo=mail-lb0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/93-13782-E4751F25 for ; Tue, 04 Feb 2014 16:10:39 -0500 Received: by mail-lb0-f171.google.com with SMTP id c11so7023906lbj.30 for ; Tue, 04 Feb 2014 13:10:34 -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=hpUuoBjfZYPhtFulF8rkUgi4CwO9BNnsuiTy7J8qWnY=; b=LalVDvQiira771V2aCd+L5+fQ3QyD5nKnZaeuMEOMahtmYDdsPxCxAOBWcEKu6enES oDOyiqKmd3dcUZ9GhygDgZIkCOXb9UVoERhRIQpYEIfXyn5S2pNvo5PAY44OoYaOe6M4 Ov5/qTIe6bJ9cWF97HgNTCHXjMzWLD8mwDezUdIb8XzW0+g5V5Z5RhmKXE342fzfYgDH /WvGjelbjba7aTrPN7wfvN+IfMl6yh+T+HTpXlyzZSnrIsFtHKOyEabj5zlR5ZkbD43i G435vTOSahr9MF7t722UYa55m2uOcIt7hcZ4BvHzhrimpSJRl4kj5z+fPYtpq89EvXCI KL2A== X-Received: by 10.152.1.3 with SMTP id 3mr2592260lai.58.1391548234637; Tue, 04 Feb 2014 13:10:34 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.199.37 with HTTP; Tue, 4 Feb 2014 13:09:54 -0800 (PST) In-Reply-To: References: <52EE2B66.4040005@pthreads.org> Date: Wed, 5 Feb 2014 06:09:54 +0900 X-Google-Sender-Auth: b0GwaJQX83HSmd2OUoiK4G-wbH4 Message-ID: To: Sebastian Krebs Cc: Joe Watkins , PHP internals Content-Type: multipart/alternative; boundary=089e013c6ae436a72504f19b12be Subject: Re: [PHP-DEV] RE: RFC: expectations/assertions From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e013c6ae436a72504f19b12be Content-Type: text/plain; charset=UTF-8 Hi Sebastian, On Tue, Feb 4, 2014 at 10:11 PM, Sebastian Krebs wrote: > but it seem not closure like this >> >> php > assert(function() {return 2>1;}); >> php > assert(function() {return 2<1;}); >> > > assert('2>1'); > > works > It's not the point. Function call works, but not closure does not. php > function f() {return FALSE;} php > assert(f()); Warning: assert(): Assertion failed in php shell code on line 1 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. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e013c6ae436a72504f19b12be--