为何覆盖父类方法参数不一致时报致命错误而不是警告?

公司的老旧代码了,好多错误,暂时无法一一修复,下面这个子类覆盖父类出错时不应该是警告吗?为什么是error,
我的PHP5.6,程序跑不下去了,同事的5.3可以通过继续运行。

2018/03/13 16:00:00 [error] 3073#0: *52 FastCGI sent in stderr: "PHP message: PHP Strict Standards:  Declaration of AddressRCache::query() should be compatible with RCache::query($name, $field = NULL, $section = NULL, $lang = NULL, $type = 'json') in /data1/wwwroot/ssss/zc_core/sssss/refactor/cache/structs/address.php on line 72
PHP message: PHP Strict Standards:  Declaration of PublicPageQueryKeywords::getResult() should be compatible with PageQuery::getResult() in /data1/wwwroot/ssssss/zc_core/sssssss/refactor/pagequery/location/public/keywords.php on line 290" while reading response header from upstream, client: 192.168.161.92, server: local.ssssss.com, request: "GET /index.php?com=crontab&t=syncOrderToCRM&zmkm=1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "local.ssssssss.com"
qq_花开花谢_0
浏览 411回答 2
2回答

胡子哥哥

5.3以后,重写父类方法时参数个数必须一致

慕慕森

父类和子类中使用相同的函数时,子类需要参数,而父类不需要参数时,就会报这个错误。
打开App,查看更多内容
随时随地看视频慕课网APP