Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wabualela committed Oct 29, 2019
1 parent 140123e commit 912398f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
21 changes: 7 additions & 14 deletions Customer.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
<?php
include './Human.php';

class Customer extends Human
{ }

echo "<title>PHP OOP Sandbox </title>";
const BR = "<br>";



include './User.php';

class Customer extends User
{
var $customer_type;
}


$kamal = new Customer;
$kamal->frist_name = "Kamal";
$kamal->second_name = "Farouk";
$kamal->birth_date['d'] = 23;
$kamal->birth_date['m'] = 7;
$kamal->birth_date['y'] = 1992;
$kamal->username = "kfarouk";
$kamal->email = "kamalfarouk@mail.sd";

echo $kamal->full_name() . BR;

// $omer = new Customer;
// $omer->frist_name = "Omer";
// $omer->second_name = "Ali";
// echo $omer->full_name() . BR;

4 changes: 3 additions & 1 deletion Human.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php
echo "<title>PHP OOP Sandbox </title>";
const BR = "<br>";

class Human
{
var $first_name;
Expand All @@ -16,4 +19,3 @@ function age()
return "";
}
}

9 changes: 9 additions & 0 deletions User.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
include './Human.php';

class User extends Human
{
var $username;
var $email;
var $password;
}

0 comments on commit 912398f

Please sign in to comment.