syntax error, unexpected variable “%s”, expecting “(”¶
Description¶
In a function definition, the name of the function is separated from the argument list by an opening parenthesis. This is missing here. This applied to closures, arrow functions and methods’ signatures.
Example¶
<?php
function foo $name: , $value = 1) {}
function bar ) {}
?>
Solutions¶
Add the missing opening parenthesis.
Provide a value for the parameter name in the functioncall.