Hi Sebastian,
On Tue, Feb 4, 2014 at 10:11 PM, Sebastian Krebs <[email protected]>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
[email protected]