I wonder how can I see syntax errors like this (missing semicolon):
This will cause a WSOD (white screen of death
Try this:
use Symfony\Component\HttpKernel\Debug\ErrorHandler;
use Symfony\Component\HttpKernel\Debug\ExceptionHandler;
// set the error handling
ini_set('display_errors', 1);
error_reporting(-1);
ErrorHandler::register();
if ('cli' !== php_sapi_name()) {
ExceptionHandler::register();
}
// init application
$app = new Silex\Application();
// set debug mode
$app['debug'] = true
$app->run();
it's important to set the error handling before initialize the $app.