Advertisement
sri211500

Untitled

Feb 25th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. <?php
  2. interface a
  3. {
  4. const b ='Interface constant';
  5. }
  6.  
  7. //Prints: interface constant
  8. echo a::b;
  9.  
  10. //This will however not work beca use it's not allowed to
  11. //override constants.
  12. class b implements a
  13. {
  14. const b ='Class constant'
  15. }
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement