[PHP-DEV] Possible RFC: PDOStatement::addBatch

2023-06-13 Thread Vinicius Dias
Hello, folks. I hope you all are well. I was talking to friend about a feature I would like to see in PHP but I mentioned that unfortunately I do not have the knowledge to try implementing it myself, since it is not something very simple, so he mentioned that I could bring this discussion up to th

Re: [PHP-DEV] [RFC] [Discussion] Deprecate functions with overloaded signatures

2023-06-13 Thread Máté Kocsis
Hi Nicolas, On my side, I'd very much prefer keeping the constructor of DatePeriod and > thus making it non-overloaded with this signature: > > public function __construct(DateTimeInterface $start, DateInterval > $interval, DateTimeInterface|int $end, int $options = 0) {} > > That'd help a lot wit

Re: [PHP-DEV] [RFC] [Discussion] Clone with

2023-06-13 Thread Máté Kocsis
(Resending my earlier message to Levi:) Hi Levi, I apologize if this has been discussed before, as I have fallen very > behind on internals discussions. I think it would be helpful to add an > example where the object being cloned accesses its properties. > Something like this: > >$b = clone

Re: [PHP-DEV] [RFC] [Discussion] Clone with

2023-06-13 Thread Larry Garfield
On Tue, Jun 13, 2023, at 3:51 PM, Máté Kocsis wrote: > Hi Larry, > > In this case, if the `with` happens first, then the new address object is >> cloned needlessly, but that *probably* doesn't hurt anything. But $newAddr >> !== $p3->address. >> > > Yes, I agree with this: "clone $this with ["x" =>

[PHP-DEV] Re: PHP 8.1 and OpenSSL

2023-06-13 Thread Jan Ehrhardt
Hi Christoph, "Christoph M. Becker" in php.internals (Wed, 18 Jan 2023 13:20:41 +0100): >While the official builds for PHP 8.2 already use OpenSSL 3.0, the PHP >8.1 builds are still using OpenSSL 1.1.1. However, OpenSSL 1.1.1 is >only supported till 2023-09-11[1], while PHP 8.1 is supported till

Re: [PHP-DEV] [RFC] [Discussion] Deprecate functions with overloaded signatures

2023-06-13 Thread Nicolas Grekas
> > > As you have possibly already experienced, overloaded signatures cause > > various smaller and bigger issues, while the concept is not natively > > supported by PHP. That's why I drafted an RFC which intends to phase > > out the majority of overloaded function/method signatures and also > > fo

Re: [PHP-DEV] [RFC] [Discussion] Clone with

2023-06-13 Thread Máté Kocsis
Hi Larry, In this case, if the `with` happens first, then the new address object is > cloned needlessly, but that *probably* doesn't hurt anything. But $newAddr > !== $p3->address. > Yes, I agree with this: "clone $this with ["x" => "y"];" is the easiest to mentally model as a shorthand for "$se

Re: [PHP-DEV] [RFC] [Discussion] Deprecate functions with overloaded signatures

2023-06-13 Thread Máté Kocsis
> > It looks like the current preferred signature was only introduced in PHP > 8.2. Previously, the signatures were dba_fetch($key, $handle) and > dba_fetch($key, $skip, $handle) - it effectively had a non-final optional > parameter. > Yes, that's the case! Thanks for reminding me again, I clarifi

Re: Fwd: [PHP-DEV] [RFC] [Discussion] Deprecate functions with overloaded signatures

2023-06-13 Thread Máté Kocsis
> > In my mind, the only reason to change anything about this function is that > we can't properly overload a function based on its argument types. There's > nothing particularly "primary" or "better" about either of the two > signatures, it's just hard to document and use named parameters while >

[PHP-DEV] Re: PHP 8.3.0alpha1 is available for testing

2023-06-13 Thread Jan Ehrhardt
Jakub Zelenka in php.internals (Thu, 8 Jun 2023 20:07:22 +0100): >PHP 8.3.0alpha1 has just been released and can be downloaded from: >https://downloads.php.net/~jakub >Or use the git tag: php-8.3.0alpha1 > >Windows binaries are available at: https://windows.php.net/qa/ > >This is the first official