$app->response()->status(500); true, see docs here .
Make sure you call $app->run(); after setting the status, it will prepare and display the response code, headers and body.
To change , make sure you define a route, or Slim will output a 404 answer, this works:
require 'Slim/Slim.php'; \Slim\Slim::registerAutoloader(); $app = new \Slim\Slim(); $app->response()->status(500); $app->get('/', function () {
source share