PHP - Classes and Objects
What will be the output of this PHP code?
<?php
class Dog {
public $name = 'Buddy';
public function bark() {
return 'Woof!';
}
}
$dog = new Dog();
echo $dog->name . ' says ' . $dog->bark();
?>