PHP error category

Syntax & Parse

Parser and tokenization failures.

Syntax & Parse errors arise when parser and tokenization failures affect an executing PHP application or its supporting service. Use the exact signature and runtime context to narrow the cause before changing configuration.

The guides in this category separate code defects from environment differences, show focused diagnostics, and favor site-scoped corrections that preserve unrelated applications.

Guides in this category

Title Pattern Severity
New PHP syntax used on an older runtime Parse error: syntax error, unexpected token "%s" in %s on line %d fatal
Parse error: syntax error, unexpected token Parse error: syntax error, unexpected token "%s" in %s on line %d parse
Parse error: unexpected end of file Parse error: syntax error, unexpected end of file in %s on line %d parse
Unclosed brace Parse error: Unclosed '{' on line 9 in %s on line %d parse
Unclosed parenthesis Parse error: Unclosed '(' on line 17 in %s on line %d parse
Unexpected identifier Parse error: syntax error, unexpected identifier "return", expecting ";" in %s on line %d parse
Unexpected string content Parse error: syntax error, unexpected single-quoted string "host", expecting "]" in %s on line %d parse
Unexpected variable Parse error: syntax error, unexpected variable "$name" in %s on line %d parse

Helpful tools