Re: [PHP-DEV] Function boolval()

2012-04-29 Thread Kris Craig
On Sun, Apr 29, 2012 at 2:22 PM, Jille Timmermans wrote: > On 28-04-12 06:27, Kalle Sommer Nielsen wrote: > >> 2012/4/27 Jille Timmermans: >> >> I suggest we add a function boolval(). It simply converts the given >>> argument >>> to a boolean, like strval(), intval() and floatval(). I already ha

Re: [PHP-DEV] Function boolval()

2012-04-29 Thread Jille Timmermans
On 28-04-12 06:27, Kalle Sommer Nielsen wrote: 2012/4/27 Jille Timmermans: I suggest we add a function boolval(). It simply converts the given argument to a boolean, like strval(), intval() and floatval(). I already have an implementation ready[1]. Why? * It is missing in the current list of *v

Re: [PHP-DEV] Function boolval()

2012-04-28 Thread Sherif Ramadan
> > $bools = array_map(function($a){ return((boolean) $a); }, range('a', 'z')); > $bools = array_map('boolval', range('a', 'z')); > > Second one seems more readable to me... > > Sorry, I forget to hit reply-all sometimes... So lets try that again... Why is this going to be more beneficial to imp

Re: [PHP-DEV] Function boolval()

2012-04-28 Thread Sebastian Krebs
Am 28.04.2012 06:27, schrieb Kalle Sommer Nielsen: Hi 2012/4/27 Jille Timmermans: Hi, I suggest we add a function boolval(). It simply converts the given argument to a boolean, like strval(), intval() and floatval(). I already have an implementation ready[1]. Why? * It is missing in the curre

Re: [PHP-DEV] Function boolval()

2012-04-27 Thread Kalle Sommer Nielsen
Hi 2012/4/27 Jille Timmermans : > Hi, > > I suggest we add a function boolval(). It simply converts the given argument > to a boolean, like strval(), intval() and floatval(). I already have an > implementation ready[1]. > > Why? > * It is missing in the current list of *val()-functions and people

Re: [PHP-DEV] Function boolval()

2012-04-27 Thread Jille Timmermans
On 27-04-12 22:19, Kris Craig wrote: On Fri, Apr 27, 2012 at 1:14 PM, Jille Timmermans https://github.com/php/php-__src/pull/60 Do you have wiki access? If so, please post an RFC for this! You'd have my vote. =) I don't. If anyone can give it to me I will post an RFC :) -- Jille -- PHP In

Re: [PHP-DEV] Function boolval()

2012-04-27 Thread Kris Craig
On Fri, Apr 27, 2012 at 1:14 PM, Jille Timmermans wrote: > Hi, > > I suggest we add a function boolval(). It simply converts the given > argument to a boolean, like strval(), intval() and floatval(). I already > have an implementation ready[1]. > > Why? > * It is missing in the current list of *v

[PHP-DEV] Function boolval()

2012-04-27 Thread Jille Timmermans
Hi, I suggest we add a function boolval(). It simply converts the given argument to a boolean, like strval(), intval() and floatval(). I already have an implementation ready[1]. Why? * It is missing in the current list of *val()-functions and people expect it to exist. I'd say it is an incon