Re: [PHP-DEV] is_array on objects with ArrayAccess or Iterator implementations

2009-12-31 Thread Alexey Zakhlestin
On Tue, Dec 29, 2009 at 3:01 AM, Etienne Kneuss wrote: > Hi, > > On Tue, Dec 29, 2009 at 1:27 AM, Clint Priest wrote: >> Etienne Kneuss wrote: >>> >>> On Tue, Dec 29, 2009 at 12:04 AM, Clint Priest >>> wrote: Unfortunately $x instanceOf ArrayAccess doesn't return true when $x is i

Re: [PHP-DEV] is_array on objects with ArrayAccess or Iterator implementations

2009-12-28 Thread Richard Lynch
On Mon, December 28, 2009 6:27 pm, Clint Priest wrote: > Etienne Kneuss wrote: >> On Tue, Dec 29, 2009 at 12:04 AM, Clint Priest >> wrote: >>> Unfortunately $x instanceOf ArrayAccess doesn't return true when $x >>> is >>> indeed an array. >> >> Making is_array return true for objects implementing

Re: [PHP-DEV] is_array on objects with ArrayAccess or Iterator implementations

2009-12-28 Thread Richard Lynch
On Mon, December 28, 2009 10:30 am, Clint Priest wrote: > Has there been any discussion or decision about whether is_array() > should return true for objects which implement ArrayAccess or is there > another function already available which checks for either being the > case? I really would prefer

Re: [PHP-DEV] is_array on objects with ArrayAccess or Iterator implementations

2009-12-28 Thread Etienne Kneuss
Hi, On Tue, Dec 29, 2009 at 1:27 AM, Clint Priest wrote: > Etienne Kneuss wrote: >> >> On Tue, Dec 29, 2009 at 12:04 AM, Clint Priest >> wrote: >>> >>> Unfortunately $x instanceOf ArrayAccess doesn't return true when $x is >>> indeed an array. >> >> Making is_array return true for objects implem

Re: [PHP-DEV] is_array on objects with ArrayAccess or Iterator implementations

2009-12-28 Thread Clint Priest
Etienne Kneuss wrote: On Tue, Dec 29, 2009 at 12:04 AM, Clint Priest wrote: Unfortunately $x instanceOf ArrayAccess doesn't return true when $x is indeed an array. Making is_array return true for objects implementing ArrayAccess is a bad idea, for two main reasons: 1) is_array is a type chec

Re: [PHP-DEV] is_array on objects with ArrayAccess or Iterator implementations

2009-12-28 Thread Etienne Kneuss
Hello, On Tue, Dec 29, 2009 at 12:04 AM, Clint Priest wrote: > Unfortunately $x instanceOf ArrayAccess doesn't return true when $x is > indeed an array. Making is_array return true for objects implementing ArrayAccess is a bad idea, for two main reasons: 1) is_array is a type check, and we shou

Re: [PHP-DEV] is_array on objects with ArrayAccess or Iterator implementations

2009-12-28 Thread Clint Priest
Unfortunately $x instanceOf ArrayAccess doesn't return true when $x is indeed an array. Jille Timmermans wrote: Op 28-12-2009 17:30, Clint Priest schreef: Has there been any discussion or decision about whether is_array() should return true for objects which implement ArrayAccess or is there a

Re: [PHP-DEV] is_array on objects with ArrayAccess or Iterator implementations

2009-12-28 Thread Jille Timmermans
Op 28-12-2009 17:30, Clint Priest schreef: Has there been any discussion or decision about whether is_array() should return true for objects which implement ArrayAccess or is there another function already available which checks for either being the case? How about $x instanceOf ArrayAccess ?