# New function http_response_code() to PHP5.4 Branch

- Thread: https://externals.io/message/53364
- Original archive: https://news-web.php.net/php.internals/53364
- Started by Paul Dragoonis on 2011-06-17T22:06:27+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #53364 — Paul Dragoonis — 2011-06-17T22:06:27+00:00

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

Hi there,

I'm requesting my function be put into the 5.4 branch.

I added a function back in the 5.3 phase to obtain missing
functionality of HEAD.c (and /ext/standard/ in general), but since it
wasn't a bug fix then it wasn't suitable to add to a 5.3.x series.

The function is `http_response_code()` - Link:
http://lxr.php.net/opengrok/xref/PHP_TRUNK/ext/standard/head.c#285

when you set the HTTP status code in header("..."); or in the param of
header, like: header("...", null, 404); then at a later date this
can't be obtained again by any PHP function.

Can this be added to 5_4 please?

Thanks,
Paul Dragoonis.

---

## #53365 — Kalle Sommer Nielsen — 2011-06-17T22:18:18+00:00

URL: https://externals.io/message/53364#53365 · In reply to: #53364

Hi Paul

2011/6/18 Paul Dragoonis <dragoonis@php.net>:
> Hi there,
>
> I'm requesting my function be put into the 5.4 branch.
>
> I added a function back in the 5.3 phase to obtain missing
> functionality of HEAD.c (and /ext/standard/ in general), but since it
> wasn't a bug fix then it wasn't suitable to add to a 5.3.x series.
>
> The function is `http_response_code()` - Link:
> http://lxr.php.net/opengrok/xref/PHP_TRUNK/ext/standard/head.c#285
>
> when you set the HTTP status code in header("..."); or in the param of
> header, like: header("...", null, 404); then at a later date this
> can't be obtained again by any PHP function.
>
> Can this be added to 5_4 please?

I'll merge it within the weekend
>
> Thanks,
> Paul Dragoonis.
>
> --
> 
> 
>
>



-- 
regards,

Kalle Sommer Nielsen
kalle@php.net

---

## #53366 — Paul Dragoonis — 2011-06-17T22:25:55+00:00

URL: https://externals.io/message/53364#53366 · In reply to: #53365

> Hi Paul
>
> 2011/6/18 Paul Dragoonis <dragoonis@php.net>:
> > […]
>
> I'll merge it within the weekend

Cheers Kalle!

> > […]
>
>
>
> --
> regards,
>
> Kalle Sommer Nielsen
> kalle@php.net
