static class name abstract


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. abstract class A {
  3. protected static function a () {
  4. echo get_class();
  5. }
  6. }
  7.  
  8. class B extends A {
  9.  
  10. }
  11.  
  12. class C {
  13. function main () {
  14. echo B::a();
  15. }
  16. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.