[PHP-DEV] Re: Add __toArray() method to objects that would be called on cast to array

2017-03-16 Thread Andrea Faulds
Hi Benoît, Benoît Burnichon wrote: Looking at the manual http://php.net/manual/en/language.types.array.php#language.types.array.casting , it seems `ArrayObject` class does not comply to array casting because integer public properties could also be retrieved. Some tests showed that regular class

[PHP-DEV] PHP 7.0.17 is available

2017-03-16 Thread Anatol Belski
Hi, The PHP development team announces the immediate availability of PHP 7.0.17. Several bugs have been fixed. All PHP 7.0 users are encouraged to upgrade to this version. For source downloads of PHP 7.0.17 please visit our downloads page: http://www.php.net/downloads.php Windows binaries can b

Re: [PHP-DEV] Add __toArray() method to objects that would be called on cast to array

2017-03-16 Thread Marco Pivetta
Since some folks keep banging on "it's not a BC break", I propose a challenge in fixing this particular BC break example (reads: find a different way to make it work, and no warnings/notices allowed): I made a very simplistic example of where `__toArray` will break existing API that currently lite

Re: [PHP-DEV] Add __toArray() method to objects that would be called on cast to array

2017-03-16 Thread Marcio Almada
2017-03-16 11:01 GMT-03:00 Marco Pivetta : > Since some folks keep banging on "it's not a BC break", I propose a > challenge in fixing this particular BC break example (reads: find a > different way to make it work, and no warnings/notices allowed): > > I made a very simplistic example of where `_

Re: [PHP-DEV] Add __toArray() method to objects that would be called on cast to array

2017-03-16 Thread Marco Pivetta
On Thu, Mar 16, 2017 at 3:34 PM, Marcio Almada wrote: > 2017-03-16 11:01 GMT-03:00 Marco Pivetta : > >> Since some folks keep banging on "it's not a BC break", I propose a >> challenge in fixing this particular BC break example (reads: find a >> different way to make it work, and no warnings/noti

[PHP-DEV] PHP 7.1.3 Released

2017-03-16 Thread Joe Watkins
Hi, The PHP development team announces the immediate availability of PHP 7.1.3. Several bugs have been fixed. All PHP 7.1 users are encouraged to upgrade to this version. For source downloads of PHP 7.1.3 please visit our downloads page: http://www.php.net/downloads.php Windows binaries can be

[PHP-DEV] GOOD Benchmark Results for PHP Master 2017-03-15

2017-03-16 Thread lp_benchmark_robot
Results for project PHP master, build date 2017-03-15 20:29:33-07:00 commit: 6ad0a6f previous commit:8a7a141 revision date: 2017-03-15 19:50:26+01:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

[PHP-DEV] Let range() return a generator?

2017-03-16 Thread Sebastian Bergmann
For me, foreach (range($low, $high) as $i) is easier to understand than for ($i = 0; $i <= $high; $i++) By easier to understand I do not only mean that the beginning of the loop marked by the foreach/range construct is easier to read. While reading the body of the loop I can be sure

Re: [PHP-DEV] Let range() return a generator?

2017-03-16 Thread Niklas Keller
> > For me, > > foreach (range($low, $high) as $i) > > is easier to understand than > > for ($i = 0; $i <= $high; $i++) > > By easier to understand I do not only mean that the beginning of the loop > marked by the foreach/range construct is easier to read. While reading the > body of the lo