Statement on glibc/iconv Vulnerability

Класс Override

(PHP 8 >= 8.3.0)

Введение

Обзор классов

final class Override {
/* Методы */
public __construct()
}

Примеры

<?php

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

final class
Extended extends Base
{
#[
\Override]
protected function
boo(): void {}
}

?>

Результат выполнения приведённого примера в PHP 8.3 аналогичен:

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

Смотрите также

Содержание

add a note

User Contributed Notes

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