Re: [PHP-DEV] [RFC] Never For Argument Types

2021-08-16 Thread Jordan LeDoux
On Mon, Aug 16, 2021 at 12:51 AM Nikita Popov wrote: > We have a better way to specify markers for the engine: Magic methods. I > think some people have a mistaken notion that engine-integrated interfaces > are always better than magic methods. This is only the case if such > interfaces are actua

Re: [PHP-DEV] Unwrap reference after foreach

2021-08-16 Thread Michael Wallner
> > This seems like a good opportunity to go one step further and have loops > create a new scope, which would automagically handle the unwrapping with out > worrying about the edge cases. Obviously, this would be a bigger BC break, > but one worth considering. > Sounds reasonable, but this i

[PHP-DEV] PHP 8.0.10RC1 Available for testing

2021-08-16 Thread Gabriel Caruso
PHP 8.0.10RC1 has just been released and can be downloaded from: https://downloads.php.net/~carusogabriel/ (thanks Derick for uploading everything) Or use the git tag: php-8.0.10RC1 Windows binaries are available at https://windows.php.net/qa#php-8.0 Please test it carefully, and report any bug

Re: [PHP-DEV] [VOTE] Nullable intersection types

2021-08-16 Thread Joe Watkins
Morning Nikita, all, The exception was granted to ratify consensus that I thought we had - and that one of the two primary votes on the current RFC seems to support. However, the RFC we got was something that contained multiple primary votes - we must consider the first two votes primary, we don'

Re: [PHP-DEV] mb_check_encoding slow performance?

2021-08-16 Thread Nikita Popov
On Mon, Aug 9, 2021 at 10:14 PM Rowan Tommins wrote: > On 07/08/2021 18:57, Hans Henrik Bergan wrote: > > can someone shed some light on this? why does mb_check_encoding seem to > be > > so much slower than the alternatives? > > benchmark code+results is here > https://stackoverflow.com/a/6869075

Re: [PHP-DEV] [RFC] Never For Argument Types

2021-08-16 Thread Faizan Akram Dar
On Aug 16 2021, at 1:21 pm, Nikita Popov wrote: > On Sat, Aug 14, 2021 at 3:44 PM Jordan LeDoux > wrote: > > > > > > > On Sat, Aug 14, 2021 at 6:25 AM Nikita Popov wrote: > > > >> > >> function addMultiple(CollectionInterface $collection, mixed ...$inputs): > >> void { > >> foreach ($inputs as $

Re: [PHP-DEV] [VOTE] Nullable intersection types

2021-08-16 Thread Nikita Popov
On Mon, Aug 16, 2021 at 9:45 AM Joe Watkins wrote: > Morning all, > > The initial RFC was clear that nullability was not supported, however that > doesn't seem to be have widely understood. > > When I said we should move forward I did imagine that there was some > consensus about the syntax we sh

Re: [PHP-DEV] [RFC] Never For Argument Types

2021-08-16 Thread Nikita Popov
On Sat, Aug 14, 2021 at 3:44 PM Jordan LeDoux wrote: > > > On Sat, Aug 14, 2021 at 6:25 AM Nikita Popov wrote: > >> >> function addMultiple(CollectionInterface $collection, mixed ...$inputs): >> void { >> foreach ($inputs as $input) $collection->add($input); >> } >> >> A static analyzer shou

Re: [PHP-DEV] [VOTE] Nullable intersection types

2021-08-16 Thread Joe Watkins
Please rearrange and add words as necessary, so that they makes sense :) "... however that doesn't seem to have been widely understood". Cheers Joe On Monday, 16 August 2021, Joe Watkins wrote: > Morning all, > > The initial RFC was clear that nullability was not supported, however that > does

Re: [PHP-DEV] [VOTE] Nullable intersection types

2021-08-16 Thread Joe Watkins
Morning all, The initial RFC was clear that nullability was not supported, however that doesn't seem to be have widely understood. When I said we should move forward I did imagine that there was some consensus about the syntax we should use if we were to support nullability. As this conversation

Re: [PHP-DEV] [VOTE] Nullable intersection types

2021-08-16 Thread Deleu
On Mon, Aug 16, 2021 at 2:22 AM Tobias Nyholm wrote: > Hey. > > > No mistake: the "pure intersection types" RFC was explicitly designed to > avoid scope creep (this RFC). > > > Just because it was intentional, does not make it less of a mistake. > I see that we have different views of this. And I