PHP - Classes and Objects
Find the error in this PHP code:
<?php
class Animal {
private $type;
public function setType($type) {
$this->type = $type;
}
}
$animal = new Animal();
echo $animal->type;
?>