You don't see any error messages because the semicolon in this specific case is optional. It is because it's right before the closing php tag. Missing it in this location is still acceptable (even if not recommendable) syntax.
I took this info from here, then followed the link to the php documentation's corresponding page.
If you want to rely on this output from the development php server, you can do an extra step to ensure that you really don't miss anything, by using the
Putting these lines
at the beginning of your script will ensure that even the smallest concerns will get printed in the console.
If you are learning php and using the development server to sharpen your skills, you could permanently enable these adjustments (so that you don't have to remember to put the above snippets in all your scripts).
For this, you need to find the php interpreter's configuration file, which is called
Putting the following line in any of your scripts
and subsequently looking at the output in a browser will summarize the configuration in a graphical fashion. The
php.ini file's location is in the row labelled with: "Loaded Configuration File".
An alternative way would be issuing the command in terminal
with similar results.
You can now open this file in an editor (
sudo will be necessary to save the file, if it's in a system directory), search for the lines starting with
display_errors, and edit them to your liking.
php.ini itself, a handy in-line documentation will precede these lines, explaining the exact values and syntax you may use.
Depending on the progress you make in authoring applications, relying on the php development server's output for debugging may soon prove itself unsatisfactory.
For debugging done proper (and benefit from "entire new dimensions" of possibilities), one could consider installing and using a dedicated IDE (Integrated Development Environment), like PhpStorm or Apache Netbeans, and learn the ins and outs of debugging with these applications.