syntax error, unexpected integer “%s”, expecting “)”¶
Description¶
This error is a variation of the named parameter typo: the missing semi colon between the name and the value leads to an identifier next to an unrelated operator. The suggestion to use a closing parenthesis is valid, though not the only one.
Example¶
<?php
foo(arg new B());
class B {}
function foo(B $arg) {}
?>
Solutions¶
Add the missing
:before the integer.Add the missing
)before the integer, and may be a comma, depending on the context.