[PHP-DEV] run-tests.php enhancement

2017-05-06 Thread Sara Golemon
Any objections if I add an extra output to run-tests.php? https://github.com/php/php-src/pull/2515 I'm working on some CI stuff and a machine readable output would be handy. '-w' is nice for a list of failed tests, but I want to know all dispositions, not just failures. I considered going for a

Re: [PHP-DEV] Add is_vectorlike($array) function

2017-05-06 Thread Eugene Leonovich
> > > > > > I gave one use case in an earlier message: many serialisation formats > have > > a different form for ordered lists vs key-value pairs. As an obvious > > example, look at JSON arrays and objects, and many other formats have > > similar types. > > > > Ah, so you would do something like >

Re: [PHP-DEV] Add is_vectorlike($array) function

2017-05-06 Thread Ryan Pallas
On Sat, May 6, 2017 at 9:42 AM, Rowan Collins wrote: > On 5 May 2017 22:19:51 BST, Ryan Pallas wrote: > >I just read this thread and am wondering what exactly is the use case? > >Like > >are you going to do something if it is vector-like, and do something > >different (or not do anything at all)

Re: [PHP-DEV] Add is_vectorlike($array) function

2017-05-06 Thread Rowan Collins
On 5 May 2017 22:19:51 BST, Ryan Pallas wrote: >I just read this thread and am wondering what exactly is the use case? >Like >are you going to do something if it is vector-like, and do something >different (or not do anything at all) if it's not vector-like? I mean, >if >you have to crawl it, and

Re: [PHP-DEV] Add is_vectorlike($array) function

2017-05-06 Thread Aidan Woods
> Also, given the implementation above, why does the array have to be ksorted > correctly to count? Specifically, why isn't this array considered vector > like? > $arr = [ > 1=> 1, > 0=> 0, > ]; I suppose the question would be, given that array (or a similar out-of-order array), should is_