title: When to use Final in PHP?
body: <p>I know what the definition is of a Final class, but I want to know how and when final is really needed.</p>
  
  <pre><code>&lt;?php
  final class Foo extends Bar
  {
     public function()
     {
       echo 'John Doe';
     }
  }
  </code></pre>
  
  <p>If I understand it correctly, 'final' enables it to extend 'Foo'.</p>
  
  <p>Can anyone explain when and why 'final' should be used? In other words, is there any reason why a class should not be extended?</p>
  
  <p>If for example class 'Bar' and class 'Foo' are missing some functionality, it would be nice to create a class which extends 'Bar'.</p>