24 lines
384 B
PHP
24 lines
384 B
PHP
|
<?php
|
||
|
|
||
|
require_once "src/Animal.php";
|
||
|
require_once "src/traits/Jumping.php";
|
||
|
require_once "src/Cat.php";
|
||
|
require_once "src/Dog.php";
|
||
|
require_once "src/Cow.php";
|
||
|
|
||
|
$cat = new \src\Cat();
|
||
|
$dog = new \src\Dog();
|
||
|
$cow = new \src\Cow();
|
||
|
|
||
|
$dog->makeSound();
|
||
|
$cat->makeSound();
|
||
|
$cow->makeSound();
|
||
|
|
||
|
$dog->makeJump();
|
||
|
$cat->makeJump();
|
||
|
|
||
|
echo "<pre>";
|
||
|
print_r($cat);
|
||
|
|
||
|
$cat->meow();
|
||
|
$dog->woof();
|