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

Objects in PHP Forum

View Course

692 points
55f6bbb9937676b0aa00059e_129087668?awsaccesskeyid=akiajkz7qvqfd72xnj3q&expires=1501076946&signature=kwr3dsfas2%2bwowsqoeejctzzhyi%3d
Submitted by
Darkhorse
almost 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?

<?php
class Dog{
public $numLegs = 4;
public $name;

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

0 votes

permalink

you didn't close your function with " } "

426 points
9a74e1277d8e32358137a88e715f067c?s=140&d=retro
Submitted by
Bret Wagner
almost 2 years ago