forked from kevincoxme/php-basic-oop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
30 lines (26 loc) · 894 Bytes
/
index.php
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
<?php
include_once('classes/Sql.php');
//include_once('classes/Student.php');
include_once('classes/Inheritance.php');
/*
* '$student = new Student' object ang tawag sa $student, gagawa ka ng blueprint ni Student class para magamit mo si Student Class sa pmamagitan ng 'new Student()'
* '('kevin', 'Monteza')' ayan ung value ng mga parameters na ipapasa mo sa class, automatic si __constructor, ayan ung kkunin niang value
* '$student->getFullName()' gamit ung object, iaaccess mo ung methods na getFullName() sa pamamagitan ng '->'
*/
// Student Class Test
/*$student = new Student('Kevin', 'Monteza');
echo $student->getFullName();
//Sql Class Test
$sql = new Sql;*/
//Inheritance Class Test
$student = new Student;
echo $student->saveStudent();
?>
<!DOCTYPE html>
<html>
<head>
<title>OOP Exercise</title>
</head>
<body>
</body>
</html>