-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTask4.php
More file actions
34 lines (28 loc) · 706 Bytes
/
Task4.php
File metadata and controls
34 lines (28 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
class Animal {
public function Sound() {
echo "Sound";
}
}
class Fox extends Animal {
public function Sound() {
echo "Fox Fox...<br>";
}
}
class Cat extends Animal {
public function Sound() {
echo "Cat Cat...<br>";
}
}
class Owl extends Animal {
public function Sound() {
echo "Owl Owl...<br>";
}
}
$obj1 = new Fox();
$obj2 = new Cat();
$obj3 = new Owl();
$obj1->Sound();
$obj2->Sound();
$obj3->Sound();
?>