#[Override] attribute is coming to PHP 8.3

preview_player
Показать описание

----------------------------------------------------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

Very cool, although we should strive towards not using inheritance

spicynoodle
Автор

estou a usar a tua library openAI PHP e vim aqui dar follow. é bom ver portugal a representar.

ricardodelacrvz
Автор

This may be a stupid question, so beware :)
In your code, the returned value is 'foo', from the parent class method - even when the override attribute is used. Basically the foo() from the child class isn't used at all, just to check if the method exists in its parent.

So why go to all those lengths with an #Override attribute? Just to ensure the method exists in the parent class?

hrsa
Автор

imho keyword would be better, just like PHP already have readonly, that does the same as readonly in C#

moofymoo
Автор

Thanks for the amazing tutorials. Can you make a video about sublime setup for php? thanks

foodallergyguides
Автор

Poeple are moving on with Composition and PHP is still making icing for Inheritance.

MrYevelnad
Автор

This may be a noobie syndrome but I don't get it 🤷

Like why would someone need this ?

Explanations are welcomed 🤗

hetparekh
join shbcf.ru