Home  >  Article  >  php教程  >  PHP object-oriented final application

PHP object-oriented final application

WBOY
WBOYOriginal
2016-08-04 08:57:091052browse

final is easy to understand literally in English, and translated into Chinese it means "final". In PHP object-oriented programming, the application of final mainly has two functions:

1. Classes modified with final cannot be inherited

<?php
final class Person {
          public $name;
                                     
function
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn