This forum is now read-only. Please use our new forums at

Objects in PHP Forum

View Course

692 points
Submitted by
over 2 years ago

expecting T_FUNCTION on line 14

Here is my code for 7/10. It passed but I still got error saying
"Parse error: syntax error, unexpected TSTRING, expecting TFUNCTION on line 14" . - Line 14 is the dog function construct line. Anyone know what message means?

class Dog{
public $numLegs = 4;
public $name;

Dog function__construct($name){        
    $this->name = $name;

0 votes


you didn't close your function with " } "

436 points
Submitted by
Bret Wagner
over 2 years ago