Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

No Semicolon In Sight

<?php

echo 'a',

?>
//Parse error: syntax error, unexpected token ";" in /in/6WEF0 on line 5

This PHP code doesn’t compile: the echo must be complete to be closed with a PHP tag. Either the comma should be a semicolon, or an extra argument should be present.

In any case, the linting error message reports an unexpected semicolon, which is not visible in the code. Indeed, it is hidden in the PHP closing tag.

See Also

PHP Error Messages

PHP Features

Last updated: 10 September 2026