Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

关于php 方法参数个数传参不对,调用报错的问题?

方法定义:

protected function get($para1, $para1, $para1){
    ...
}

方法调用

get('1', '2');

正常来说这样调用应该会报错的。

我在本地(PHP 7.1)调用就报错了.在我的服务器(PHP 7.0)上调用就没报错,

这是什么原因导致的?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

确定在php.ini中对错误级别的设置是否一致。7.1报错而7.0不报错,就是错误级别设置不同


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...