Re: RE: RFC: expectations/assertions
| From: | Yasuo Ohgaki | Date: | Wed, 05 Feb 2014 03:11:45 +0000 |
| Subject: | Re: RE: RFC: expectations/assertions | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-72237@lists.php.net to get a copy of this message | ||
Hi all,
On Wed, Feb 5, 2014 at 7:53 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
> php > assert('function() {return FALSE;}');
> php > assert('function() {return TRUE;}');
>
> It does not work, but
>
> php > assert(eval('function() {return FALSE;};'));
>
> Warning: assert(): Assertion failed in php shell code on line 1
>
> so closure in eval() works. I don't see reason not to allow closure
> directly.
> It only seems inconsistent to me.
>
Added this to inconsistent behaviors RFC to track.
https://wiki.php.net/rfc/inconsistent-behaviors#assert
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net