[英]PHP version 4 :: Parse error: syntax error, unexpected '=', expecting ')'
This function working properly with the newer PHP versions:此 function 与较新的 PHP 版本正常工作:
function MKDSLD($mkD,&$slD=array()){}
BUT但
I'm getting:我越来越:
Parse error: syntax error, unexpected '=', expecting ')'
With PHP 4.使用 PHP 4。
Needless to say that I got to solve it under the older version of PHP:)不用说我得在老版本的PHP下解决了:)
Pretty simple but I guess small tweak is needed here:D很简单,但我想这里需要做一些小调整:D
Thank you in advance !先感谢您 !
PHP 4 doesn't support default parameters for reference parameters. PHP 4 不支持参考参数的默认参数。
You should deal with $slD
as a required argument:您应该将$slD
作为必需参数处理:
function MKDSLD($mkD, &$slD){
// code
}
$x = array();
MKDSLD(5, $x);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.