If there's an error in your php code you might not always get an output of the error.
Since php can't be be compiled, we don't get the code validated at runtime. Instead we can run php with the
$ php -l myfile.php
This will hopefully say
No syntax errors detected in myfile.php. But if there is an error, you will get something like this: