Three quick things i want to point out.
1. The reason for the error is that you set $judy and $joe as strings (since you added ."<br>" after declaring the object).
2. Matt is right in having to call the _construct function, but you could simplify things if you added another underscore before it.
http://php.net/manua....oop5.decon.php
class Person{
private $name;
function __construct($name){
$this->name = $name;
}
function getName(){
return $this -> name;
}
}
$judy = new Person("Judy");
$joe = new Person("Joe");
echo $judy->getName()."<br>";
echo $joe->getName();
3. Calling the construct function of the same object will simply overwrite the name on that object. But, making a new object will make a new object, no harm, no foul. But, it would be wise to give your variables more general names (like how matt called the variable $cl, not $judy), that way, when you go to change something, you don't have to change every variable in order to still follow it.