<?php
class Dog{
public $numLegs = 4;
public $name;
public function __construct($name){
}
public function bark(){
return "Woof!";
}
public function greet(){
return "My name is ".$this->name;
}
}
$dog1 = new Dog('Barker');
echo $dog1->greet();
?>
PD9waHAKY2xhc3MgRG9newogICAgcHVibGljICRudW1MZWdzID0gNDsKICAgIHB1YmxpYyAkbmFtZTsKICAgIHB1YmxpYyBmdW5jdGlvbiBfX2NvbnN0cnVjdCgkbmFtZSl7CiAgICB9CgoKCiAgICBwdWJsaWMgZnVuY3Rpb24gYmFyaygpewogICAgICAgIHJldHVybiAiV29vZiEiOwogICAgfQogICAgcHVibGljIGZ1bmN0aW9uIGdyZWV0KCl7CiAgICAgICAgcmV0dXJuICJNeSBuYW1lIGlzICIuJHRoaXMtPm5hbWU7CiAgICB9Cgp9CgokZG9nMSA9IG5ldyBEb2coJ0JhcmtlcicpOwoKZWNobyAkZG9nMS0+Z3JlZXQoKTsKCj8+