継承したメソッドの
引数が違うとE_WARNING
root@c182b8ea1b57:/tmp# cat hoge.php
<?php
abstract class Hoge {
public function getHuga($huga) {
}
}
class Huga extends Hoge {
public function getHuga() {
return "Hello Huga";
}
}
$hoge = new Huga();
var_dump($hoge->getHuga());
root@c182b8ea1b57:/tmp# php hoge.php
Warning: Declaration of Huga::getHuga() should be compatible with Hoge::getHuga($huga) in /tmp/
hoge.php on line 12
string(10) "Hello Huga"