Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. <?php
  2.  
  3. class Foo
  4. {
  5.     public static function whoAmI()
  6.     {
  7.         echo __CLASS__;
  8.     }
  9.  
  10.     public static function test()
  11.     {
  12.          static::whoAmI();
  13.     }
  14. }
  15.  
  16. class Bar extends Foo
  17. {
  18.     public static function whoAmI()
  19.     {
  20.         echo __CLASS__;
  21.     }
  22. }
  23.  
  24. Bar::test();
  25. echo PHP_EOL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement