折雨的天空
PHP8,提示:Deprecated: Required parameter $xxx follows optional parameter
2021-12-9 我好笨


参照:



https://blog.csdn.net/weixin_43944691/article/details/120530134







原因是:函数的参数带有默认值时,如果不再参数最后,PHP8会提示deprecated。



把默认值去掉,在函数体内做判定即可。

发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容