Re: [PHP-DEV] NULL Coercion Consistency

2022-04-25 Thread Craig Francis
On 21 Apr 2022, at 15:09, Rowan Tommins wrote: > On Wed, 20 Apr 2022 at 18:02, Craig Francis wrote: >> I'm just trying to focus on how PHP has worked > > You keep repeating this mantra, but user-defined functions with declared > parameter types have never accepted nulls, in any mode, unless exp

Re: [PHP-DEV] NULL Coercion Consistency

2022-04-25 Thread Craig Francis
> On 21 Apr 2022, at 17:32, Andreas Leathley wrote: > >>> There is another 3.5 years until PHP 9 is likely to come out, which is a >>> lot of time for people to adjust their codebase. I could even see an >>> argument for not promoting it to a fatal error in 9.0 if so many people >>> need mo

Re: [PHP-DEV] NULL Coercion Consistency

2022-04-25 Thread Rowan Tommins
On 25/04/2022 10:44, Craig Francis wrote: You're right, I am working with a few development teams that are simply not upgrading to 8.1 at the moment, they don't have the time to fix this issue... two are using set_error_handler() to ignore this specific deprecation notice, and one team has mov

Re: [PHP-DEV] NULL Coercion Consistency

2022-04-25 Thread Craig Francis
On 25 Apr 2022, at 11:35, Rowan Tommins wrote: > Taking time to find and make fixes is the whole point of deprecation notices > - if nothing else changes, they can expect to have another 3.5 years before a > version of PHP is released where these become errors. Upgrading to PHP 8.1 as > soon as

Re: [PHP-DEV] MySQLi Execute Query RFC

2022-04-25 Thread Craig Francis
On 22 Apr 2022, at 13:09, Guilliam Xavier wrote: > > https://wiki.php.net/rfc/mysqli_execute_query > > > > Thanks. Maybe add (or even start with) an example of mysqli_query(), to show > how "migrating to safer" would become easier? retro-fitting y

Re: [PHP-DEV] [VOTE] Undefined Property Error Promotion

2022-04-25 Thread Guilliam Xavier
Hi Rowan, (...) Also, there's this non-standard class called > "stdClass", which unlike standard classes, you can read and write any > property you like without declaring it, Better reordered "write and read" I think. Yes, like associative arrays, stdClass is "dynamic" by design. > and even if

[PHP-DEV] PHP 8.2 Release Manager Selection

2022-04-25 Thread Christoph M. Becker
Hi all, with the first alpha of PHP 8.2 due in 6 weeks (unless we are going to change our usual schedule), I think it's time to start the process of finding and electing release managers for the next minor release of PHP. We are looking for two souls to take on this role. Whomsoever is elected w

[PHP-DEV] PHP 8.2 Release Manager Selection

2022-04-25 Thread Sergey Panteleev
Hi all, Lately I've been doing documentation for PHP, keeping the Russian version up to date, and helping a little with the English, German and French versions. I would also like to contribute and help in other areas, such as newbie RM. If possible, my hat is in the ring. — wbr, Sergey Pantele

Re: [PHP-DEV] Discussion before submission of array_transpose() RFC

2022-04-25 Thread mickmackusa
On Sun, Apr 24, 2022 at 10:24 PM Rowan Tommins wrote: > > On 23/04/2022 23:42, mickmackusa wrote: > > Ideally, PHP should have a native transposing function to put > > developers out of their misery -- much like array_key_last() did. > > > I think a better comparison would be array_column - > http

Re: [PHP-DEV] Re: LOCK_SH for file_get_contents ?

2022-04-25 Thread Guilliam Xavier
First, hello... > This has been requested for years (since at least 2009?) but it seems no > > actual plan has been proposed > > How about this? > > since we already have the constant FILE_USE_INCLUDE_PATH , seems it was > > introduced in PHP5.0.0, > > > > 1: FILE_USE_INCLUDE_PATH currently collid

Re: [PHP-DEV] [RFC] [Discussion] Readonly Classes

2022-04-25 Thread Thomas Gutbier
Am 19.04.2022 um 09:58 schrieb Máté Kocsis: Hi Everyone, After quite a long pause, I'd like to revive the discussion of readonly classes and possibly put it to vote in the coming week(s). If I'm following, then this RFC is about 90% syntactic sugar for putting `readonly` on all properties, plu

Re: [PHP-DEV] [VOTE] Undefined Property Error Promotion

2022-04-25 Thread Rowan Tommins
On 25/04/2022 12:24, Guilliam Xavier wrote: Hi Rowan, (...) Also, there's this non-standard class called "stdClass", which unlike standard classes, you can read and write any property you like without declaring it, Better reordered "write and read" I think. Yes, like associative arrays, stdCl

Re: [PHP-DEV] MySQLi Execute Query RFC

2022-04-25 Thread Guilliam Xavier
On Mon, Apr 25, 2022 at 1:05 PM Craig Francis wrote: > On 22 Apr 2022, at 13:09, Guilliam Xavier > wrote: > > > https://wiki.php.net/rfc/mysqli_execute_query > > Thanks. Maybe add (or even start with) an example of mysqli_query(), to > show how "migrating to safer" would become easier? retro-fit

Re: [PHP-DEV] [VOTE] Undefined Property Error Promotion

2022-04-25 Thread Guilliam Xavier
> > Are you proposing to deprecate the implicit `= null` default initializer > > for untyped properties? > > Yes. > > > > Thanks for the recap. For untyped properties, that's the historical > > behavior. For typed properties, that's explained in > > > https://wiki.php.net/rfc/typed_properties_v2#un

Re: [PHP-DEV] [RFC] [Discussion] Readonly Classes

2022-04-25 Thread Máté Kocsis
Hi Thomas, The attribute #[AllowDynamicProperties] should not be allowed for > readonly classes. > Nice catch and I do agree with you, so I will add this restriction. Máté

Re: [PHP-DEV] [VOTE] Undefined Property Error Promotion

2022-04-25 Thread Rowan Tommins
On 21/04/2022 22:45, Mark Randall wrote: Internals, I have now opened voting on Undefined Property Error Promotion. https://wiki.php.net/rfc/undefined_property_error_promotion In case anyone missed it due to some messed-up mail headers, the thread I intended to be a reply to this is here:

Re: [PHP-DEV] NULL Coercion Consistency

2022-04-25 Thread Rowan Tommins
On 25/04/2022 10:33, Craig Francis wrote: The fact that internal functions have parameter parsing behaviour that is almost impossible to implement in userland, and often not even consistent between functions, is a wart of engine internals, not a design decision. Bit of a tangent, but do you h

Re: [PHP-DEV] NULL Coercion Consistency

2022-04-25 Thread Larry Garfield
On Mon, Apr 25, 2022, at 4:07 PM, Rowan Tommins wrote: > Off the top of my head, I don't know what other inconsistencies remain, > but my point was that in every case so far, internal functions have been > adapted to match userland, not vice versa. Internal functions error if you pass excessi

[PHP-DEV] Add another php syntax for simplify code

2022-04-25 Thread chopins xiao
0. when dot object opeator is enable, use small sign and add sign [<+] be equivalent to [.] for string concat mark. compatibility is achieved through configuration switches. syntax : >>> $a = 'str0'; >>> $a .= 'str1' <+ 'str2' <+ 'str3' <+ $str_var <+ strcall();