Guest User

Untitled

a guest
Nov 22nd, 2021
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2.  
  3. trait T1 {
  4.     function digaOi() {
  5.         echo "oi\n";
  6.     }
  7. }
  8.  
  9. trait T2 {
  10.     function digaOi2() {
  11.         echo "oi 2\n";
  12.     }
  13. }
  14.  
  15. class Teste {
  16.     use T1 ;
  17.     use T2 ;
  18.  
  19.     function digaOi3() {
  20.         echo "oi 3\n";
  21.     }
  22. }
  23.  
  24. $t = new Teste();
  25.  
  26. $t->digaOi();
  27. $t->digaOi2();
  28. $t->digaOi3();
Add Comment
Please, Sign In to add comment