Declaring Final Classes And Methods

<?php
     final class NoExtending {
          public function myFunction() {
          }
     }
     class restrictedExtending {
          final public function anotherFunc() {
          }
     }
     class myChild extends restrictedExtending {
          public function thirdFunction() {
          }
     }
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.