first
This commit is contained in:
24
index.php
Normal file
24
index.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?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();
|
Reference in New Issue
Block a user