Re: [PHP-DEV] [RFC] Null Coalescing Assignment in Method Signature

2021-01-21 Thread Larry Garfield
On Thu, Jan 21, 2021, at 4:37 PM, Sara Golemon wrote: > On Thu, Jan 21, 2021 at 3:29 PM Larry Garfield > wrote: > > > > I'm unclear why you'd allow null at all then. > > If you want $bar to be optional, and to be an empty array if not > specified, then just do: > > > > function foo(array $bar = [

Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode

2021-01-21 Thread Kamil Tekiela
On Thu, 21 Jan 2021 at 21:51, Björn Larsson wrote: > If I understand this correctly, does it imply that a lot of > legacy code that works today, will not work any longer and > needs to change? Like: > if ("mysqlierror") { > "error handling" > } > > If so I think that like in other RFC's a

Re: [PHP-DEV] [RFC] Null Coalescing Assignment in Method Signature

2021-01-21 Thread Sara Golemon
On Thu, Jan 21, 2021 at 3:29 PM Larry Garfield wrote: > > I'm unclear why you'd allow null at all then. > If you want $bar to be optional, and to be an empty array if not specified, then just do: > > function foo(array $bar = []) { ... } > > At that point, the only thing adding ?array does is all

Re: [PHP-DEV] [RFC] Null Coalescing Assignment in Method Signature

2021-01-21 Thread Rowan Tommins
On 21/01/2021 21:28, Larry Garfield wrote: I'm unclear why you'd allow null at all then. If you want $bar to be optional, and to be an empty array if not specified, then just do: function foo(array $bar = []) { ... } At that point, the only thing adding ?array does is allow you to explicitly

Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode

2021-01-21 Thread Björn Larsson
Den 2021-01-21 kl. 00:04, skrev Kamil Tekiela: Hi Internals, Following my earlier announcement in https://wiki.php.net/rfc/improve_mysqli I decided to submit a dedicated RFC for the first proposal. This RFC proposes to change the default mysqli error reporting mode to exception mode. This chang

Re: [PHP-DEV] [RFC] Null Coalescing Assignment in Method Signature

2021-01-21 Thread Larry Garfield
On Thu, Jan 21, 2021, at 5:51 AM, Daniel Simkus wrote: > Hello all, > > I am writing to see if anyone is interested in an RFC for ability to > automatically coalesce nullable method parameters with the supplied > default. It would look something like this: > > function foo(?array $bar ??= []) {

Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode

2021-01-21 Thread Larry Garfield
On Wed, Jan 20, 2021, at 5:04 PM, Kamil Tekiela wrote: > Hi Internals, > > Following my earlier announcement in https://wiki.php.net/rfc/improve_mysqli > I decided to submit a dedicated RFC for the first proposal. > > This RFC proposes to change the default mysqli error reporting mode to > except

[PHP-DEV] PHP 8.0.2RC1 is available for testing

2021-01-21 Thread Gabriel Caruso
PHP 8.0.2RC1 has just been released and can be downloaded from: Or use the git tag: php-8.0.2RC1 Windows binaries are available at: Please test it carefully, and report any bugs in the bug system < https://bugs

[PHP-DEV] [RFC] Null Coalescing Assignment in Method Signature

2021-01-21 Thread Daniel Simkus
Hello all, I am writing to see if anyone is interested in an RFC for ability to automatically coalesce nullable method parameters with the supplied default. It would look something like this: function foo(?array $bar ??= []) { This would result in $bar automatically converting to an array if n

Re: [PHP-DEV] Proposal: short_var_export($value, bool $return=false, int $flags=0)

2021-01-21 Thread Claude Pache
> Le 21 janv. 2021 à 00:19, Sara Golemon a écrit : > > IMO print_r/var_dump should be kept out of this discussion. Those are human > readable outputs for human consumption. var_export() is about a machine > readable output for recreating initial state within a runtime. The > requirements pre

Re: [PHP-DEV] Proposal: short_var_export($value, bool $return=false, int $flags=0)

2021-01-21 Thread Rowan Tommins
On 20 January 2021 23:19:21 GMT, Sara Golemon wrote: >IMO print_r/var_dump should be kept out of this discussion. Those are >human >readable outputs for human consumption. var_export() is about a >machine >readable output for recreating initial state within a runtime. The >requirements presente