PHP - Classes and Objects
Identify the error in this PHP code:
class Animal {
const TYPE = 'Mammal';
public function getType() {
return $this::TYPE;
}
}
$animal = new Animal();
echo $animal->getType();