<?php

if ('development' == getenv('APPLICATION_ENV')) {
    ini_set('display_errors', true);
    error_reporting(E_ALL);
}

/**
 * This makes our life easier when dealing with paths. Everything is relative
 * to the application root now.
 */
chdir(dirname(__DIR__));

// Setup autoloading
include 'init_autoloader.php';

// Run the application!
Zend\Mvc\Application::init(include 'config/application.config.php')->run();
<?php

if ('development' == getenv('APPLICATION_ENV')) {
    ini_set('display_errors', true);
    error_reporting(E_ALL);
}

set_error_handler(
    function ($errno, $errstr, $errfile, $errline ) {
        throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
    }
);

/**
 * This makes our life easier when dealing with paths. Everything is relative
 * to the application root now.
 */
chdir(dirname(__DIR__));

// Setup autoloading
include 'init_autoloader.php';

// Run the application!
Zend\Mvc\Application::init(include 'config/application.config.php')->run();
Throw exceptions in stead of displaying errors
Throw exceptions in stead of displaying errors

Exceptions are handled by ZF. And they have nice stack traces in
development.
