Re: [PHP-DEV] Nullable types and strict type-hinting with default null value

2017-02-23 Thread Rowan Collins
On 23 February 2017 07:23:02 GMT+00:00, Andrey Andreev wrote: >Hi, > >On Wed, Feb 22, 2017 at 11:18 PM, Michał wrote: > >> "The >declaration >> can be made to accept NULL values if the default value of the >parameter is >> set to NULL". > >This isn't just a PHP 7 work-around for null types, it ha

Re: [PHP-DEV] Nullable types and strict type-hinting with default null value

2017-02-23 Thread Michał
Indeed, it's far too early to think about forcing people to change all their code to the ? notation. I'm also not convinced of the value even once that's established; it's not like "Foo $foo = null" can ever mean *something different* from "?Foo $foo = null", it would just be an error. Maybe i

Re: [PHP-DEV] Nullable types and strict type-hinting with default null value

2017-02-23 Thread Rowan Collins
On 23 February 2017 09:15:27 GMT+00:00, "Michał" wrote: >And what about situation when someone is forcing >declare(strict_types=1)? I think, it's really a good place to force >proper types. Including nulls. strict_types controls the behaviour of *calling* functions, but the check here would ha

Re: [PHP-DEV] Nullable types and strict type-hinting with default null value

2017-02-23 Thread Levi Morrison
On Wed, Feb 22, 2017 at 2:18 PM, Michał wrote: > a(string $test=null) // incorrect type, should throw error > > There is no reason, except of backwards compatibility, to keep this > behaviour. It's too late to change this in 7.1, maybe even in 7.2. But, what > is Your opinion? Should it be preserv

[PHP-DEV] NEUTRAL Benchmark Results for PHP Master 2017-02-22

2017-02-23 Thread lp_benchmark_robot
Results for project PHP master, build date 2017-02-22 20:28:37-08:00 commit: db982bb previous commit:41d2944 revision date: 2017-02-22 22:13:33+01:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB