Last active
September 28, 2017 11:04
-
-
Save platoosom/c2b4031805c819d68c6f307f83f546ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class People { | |
public $cardID; | |
public $firstName; | |
public $lastName | |
publict __construct() { | |
$this->cardID = '3-4512-22-213542'; | |
$this->firstName = 'Watcharamet'; | |
$this->lastName = 'Srinethirothai'; | |
} | |
private changeName($name) { | |
$this->firstName = $name; | |
} | |
public getFullName() { | |
return $this->firstName .' '. $this->lastName; | |
} | |
public setFirstName($name) { | |
$this->changeName($name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment