1級 / 平成25年度(2013) 第3回試験
問13
次の PHP コードを実行した際に出力されるものはどれか。適切なものを以下より 1 つ選択しなさい。
[code]
[code]
class hello {
protected $message;
public function __construct(){
$this->message = "web";
}
public function hello(){
print "hello";
}
}
class bye extends hello{
public function __construct(){
$this->message = "design";
}
public function hello(){
print $this->message;
}
}
$hello = new bye;
$hello->hello();