Загрузка...

45-PHP Developer: PHP OOP - final Keyword | Practice

PHP final Keyword
The final keyword is used to prevent a class from being inherited and to prevent inherited method from being overridden.
The final keyword prevents child classes from overriding a method, property, or constant by prefixing the definition with final. If the class itself is being defined final then it cannot be extended.
Final keyword in PHP is used indifferent context. The final keyword is used only for methods and classes.
Final methods: When a method is declared as final then overriding on that method can not be performed. Methods are declared as final due to some design reasons. Method should not be overridden due to security or any other reasons.

Видео 45-PHP Developer: PHP OOP - final Keyword | Practice канала Professional Skill 2023
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять