Skip to content

Instantly share code, notes, and snippets.

@platoosom
Last active September 28, 2017 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save platoosom/c2b4031805c819d68c6f307f83f546ad to your computer and use it in GitHub Desktop.
Save platoosom/c2b4031805c819d68c6f307f83f546ad to your computer and use it in GitHub Desktop.
<?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