Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.24 KB | None | 0 0
  1. class x {
  2.         const a = -1;
  3.  
  4.         static function create() {
  5.                 return self::a;
  6.         }
  7. }
  8.  
  9. class y extends x {
  10.         const a = 1;
  11.        
  12.         static function create2() {
  13.             return self::a;
  14.         }
  15. }
  16.  
  17. echo y::create();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement