Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Hello
- {
- public function hello()
- {
- echo 'Helló';
- }
- }
- trait Vilag
- {
- public function hello()
- {
- echo ', Világ!';
- }
- }
- class HelloVilag extends Hello
- {
- use Vilag;
- }
- $o = new HelloVilag();
- $o->hello(); // Helló, Világ!
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement