# [PATCH] getting current request's response code

- Thread: https://externals.io/message/38291
- Original archive: https://news-web.php.net/php.internals/38291
- Started by David Sklar on 2008-06-16T17:59:37+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #38291 — David Sklar — 2008-06-16T17:59:37+00:00

URL: https://externals.io/message/38291#38291

Any interest in the attached patch? It introduces a
"headers_response_code()" function which returns
SG(sapi_headers).http_response code. This information does not seem to
be otherwise available -- the status line does not come back with
 `headers_list()`.

---

## #38359 — Stanislav Malyshev — 2008-06-18T16:47:38+00:00

URL: https://externals.io/message/38291#38359 · In reply to: #38291

Hi!

> Any interest in the attached patch? It introduces a
> "headers_response_code()" function which returns

I see no problem with it. Just don't forget to add docs and test if you 
add it :)
-- 
Stanislav Malyshev, Zend Software Architect
stas@zend.com   http://www.zend.com/
(408)253-8829   MSN: stas@zend.com
