-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
50 lines (44 loc) · 1.07 KB
/
index.php
File metadata and controls
50 lines (44 loc) · 1.07 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
namespace Gavran\MegaHamsterCom;
use Gavran\MegaHamsterCom\HamsterDomains as HamsterDomains;
require ('vendor/autoload.php');
ini_set('max_execution_time', 60);
//echo "Hello Hamster!";
?>
<!DOCTYPE html>
<html>
<head>
<title>Mega-Hamster</title>
</head>
<body>
<h1>
<?php echo 'Hello Web Hamster!!'?>
</h1>
<hr/>
<p>
<?php
$myTheRoom = new HamsterDomains\TheRoom("The Room", 80, 50, 50, 49);
$myTheRoom->outputProductInfo();
?>
</p>
<hr/>
<p>
<?php
$myThePit = new HamsterDomains\ThePit("The Pit", 20, 69);
$myThePit->outputProductInfo();
$resultArray = $myThePit->getSpecialEquipment();
echo $resultArray[0];
echo '<br/>';
echo $resultArray[1];
?>
</p>
<hr/>
<p>
<?php
$area = $myTheRoom->calculateArea();
echo $area.' square cm.';
?>
</p>
<hr/>
</body>
</html>