Posted by Windcape Thu 1st Mar 2007 05:25 - Syntax is PHP - 29 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
PHP parser reported no syntax errors in this post!
-
-
-
class Person
-
{
-
private $firstName;
-
private $lastName;
-
private $age;
-
private $sex;
-
-
public function __construct($firstName,$lastName,$age,$sex) {
-
$this->firstName = $firstName;
-
$this->lastName = $lastName;
-
$this->age = (int)$age;
-
$this->sex = $sex;
-
}
-
-
public function getYearOfBirth() {
-
return $today - $this->age;
-
}
-
-
}
-
-
$person = new Person('Claus','Joergensen',20,'male');
-
-
?>
PermaLink to this entry https://pastebin.co.uk/11198
Posted by Windcape Thu 1st Mar 2007 05:25 - Syntax is PHP - 29 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
Comments: 0