Welcome to OGeek Q&A 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 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...