The Override class

(PHP 8 >= 8.3.0)


Sinopsis de la Clase

final class Override {
/* Métodos */
public __construct()



class Base {
protected function
foo(): void {}

final class
Extended extends Base {
protected function
boo(): void {}


Output of the above example in PHP 8.3 is similar to:

Fatal error: Extended::boo() has #[\Override] attribute, but no matching parent method exists

Ver también

Tabla de contenidos

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top