Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How can I retrieve response status code

    $app = new Phalcon\Mvc\Micro();
        function () use ($app) {
            $records = $app->getReturnedValue();
            // At this time I want to know what is the response status code!
            // Ex: in some part of the application I called: $response->setStatusCode(404, "Not Found");

This way:

$app['response']->setStatusCode(404, "Not Found");

Hello Andy.

I want to get actual status code, not set.

This way:

```php $app['response']->setStatusCode(404, "Not Found"); ```


So obvious... When was this method included?

BTW, this response is always FALSE. Curious...

did you try


is since 2.0.0 and it returns this->getHeaders()->get("Status");