syntax error, unexpected single quoted string “%s”, expecting “)”¶
Description¶
After an identifier, such as name
, there can only be a delimiter, such as (
, [
, or :
but not a string.
Example¶
<?php
foo(name 'A');
?>
Literal Examples¶
syntax-error,-unexpected-single-quoted-string-“A”,-expecting-“)”
Solutions¶
Add a colon between
name
and'A'
, to make a named parameter.Add parenthesis after
name
and around'A'
, to make a function call.Add square brackets after
name
and around'A'
, to make a array call.