> Constants are not abstract in an interface - they must be assigned a
> value. Only classes and methods can be abstract. Within an abstract class
> it is not valid to have an abstract property. Properties can be defined
> `protected int $id;` and optionally assigned a value `protected int $id =
>
Hi,
> A large part of that is because the placeholders are positional rather
> > than named, so you have to keep track of which is which; but by the time
> > you've got named placeholders, you might as well have variable
> > interpolation.
>
> I feel the same way. PHPStorm has a feature that highl
On 14/03/2022 17:18, Mark Randall wrote:
I have started the vote for promoting undefined variable access to throw
an Error exception.
The vote will run for 2 weeks until March 28th 2022.
https://wiki.php.net/rfc/undefined_variable_error_promotion
The RFC has passed with 33 votes (80%) in favou
Hi,
May I suggest adding a little "instanceof" magic to match? Like this:
match ($object) {
Someinterface => 'foo',
AnotherInterface => 'bar',
}
this can not clash with any existing code as using identifiers like this
are a syntax error currently.
Currently you could do the same with
match
On Mon, Mar 28, 2022 at 7:56 PM Karoly Negyesi wrote:
> match ($object) {
> Someinterface => 'foo',
> AnotherInterface => 'bar',
> }
>
> this can not clash with any existing code as using identifiers like this
> are a syntax error currently.
That's valid code actually, see https://3v4l.org/BE