2016-07-03

<?php
class Person {
public $isAlive = true;
public $firstname;
public $lastname;
public $age;
public function __construct($firstname, $lastname, $age) {
$this->firstname = $firstname;
$this->lastname = $lastname;
$this->age = $age;
}; <--- line 20
public function greet() {
return "Hello, my name is " .$this->firstmane . " " . $this->lastname . ". Nice to meet you! :-)"
};
};
$teacher = new Person("boring", "12345", 12345);
$student = new Person("eddy", "12341", 13);
echo $student->age;
echo $student->greet();
?>

Now I get
Parse error: syntax error, unexpected ';', expecting T_FUNCTION on line 20

Show more