Req #34058 [Opn->Wfx]: get_headers() retrieve a particular respons
| From: | tyrael@php.net | Date: | Fri, 27 Mar 2015 14:19:22 +0000 |
| Subject: | Req #34058 [Opn->Wfx]: get_headers() retrieve a particular respons | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-191640@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=34058&edit=1
ID: 34058
Updated by: tyrael@php.net
Reported by: bjori@php.net
Summary: get_headers() retrieve a particular respons
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
Package: *General Issues
PHP Version: 5CVS-2005-08-10 (dev)
Block user comment: N
Private report: N
New Comment:
I don't think it has much need now that we have array dereferencing:
$last_modified = get_headers("http://example.com",
1)["Last-Modified"];
echo $last_modified;
(hi Hannes! :P)
Previous Comments:
------------------------------------------------------------------------
[2013-10-29 07:46:50] krakjoe@php.net
There's an impl attached ...
Something to think about maybe ... if a server sends multiple headers of the same name you will only
get the first returned, if we want to return a string there's not really another (good) way.
------------------------------------------------------------------------
[2005-08-11 03:56:37] arnar at 8 dot is
Patch has been submitted to php.internals
http://news.php.net/php.internals/17815
Arnar Mar Sig
------------------------------------------------------------------------
[2005-08-10 02:42:22] bjori@php.net
Description:
------------
Any change we can make get_headers() to act like parse_url(), i.e. retrive a particular respons
(see: http://news.php.net/php.cvs/33239)?
Reproduce code:
---------------
<?php
$last_modified = get_headers("http://example.com", 1, "Last-Modified");
echo $last_modified;
?>
Expected result:
----------------
Wed, 08 Jan 2003 23:11:55 GMT
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=34058&edit=1