search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

2 answers
Q&A Grammar errors for beginners: syntax error, unexpected ':', expecting '

0

function sum(int ...$nums)

{

return array_sum($nums);

}

try {

echo sum(...nums:1,2,3,5); //This error is reported, I don’t know what the problem is.

} catch (\Throwable $th) {

echo $th->getMessage();

}

Parse error: syntax error, unexpected ':', expecting ')' in D:\phpstudy_pro\WWW\yhj.php on line 52

Your Answer
submit

2 answers
0

...nums

What is this

2020-06-09 15:17:00

Yes, delete this and it will be fine, thank you.

袁生 2020-06-09 15:19:38

submit

0

What did you write? It’s all wrong

2020-06-15 16:58:17

submit

Hot Questions

Popular tool

vc9-vc14 (32+64 bit) runtime library collection (link below)

vc9-vc14 (32+64 bit) runtime library collection (link below)

Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit

VC9 32-bit

VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version

PHP programmer toolbox full version

Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit

VC11 32-bit

VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use