Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85511 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96189 invoked from network); 27 Mar 2015 16:50:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Mar 2015 16:50:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.174 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.214.174 mail-ob0-f174.google.com Received: from [209.85.214.174] ([209.85.214.174:33605] helo=mail-ob0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/D8-38005-16A85155 for ; Fri, 27 Mar 2015 11:50:41 -0500 Received: by obvd1 with SMTP id d1so11741200obv.0 for ; Fri, 27 Mar 2015 09:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bUbjpTvL8rTO/xU8ihW7WNRzmOdRiCXvdTEq8V9zVYE=; b=iwaHEc2HW8ZboScSI7cVSrtut0NnZlPhzJJzaIesIAj4tdNj8xkRujYWZyU0cFtNUJ 9mOJThkksaUYkMgt2ZWhq/H1nM/UMld+NJgfVYABPl6o0F0gScSzNwBvNG4iYsxsJ8X3 qX0Ay38aJPoyO/dbHy02nKtYsytKjDJJ8CaN8aHaOTkKndz1YjRXKgch9K66NnHQSYJU dWBLmwG2kwalgdsz9YnuF3M9zO6KK6nD8FbxANNGAutct20HtSW7dJ39S4WNd4hO7ycL bfNsSMWW8vQ0iitKXxlSMblei0gDfqf1uXdR1EdMzqj3T3yNn66Pm5n3aTTXJMQLk7En tfYw== MIME-Version: 1.0 X-Received: by 10.202.203.82 with SMTP id b79mr2485831oig.82.1427475038165; Fri, 27 Mar 2015 09:50:38 -0700 (PDT) Received: by 10.60.81.201 with HTTP; Fri, 27 Mar 2015 09:50:38 -0700 (PDT) In-Reply-To: <55158859.5000606@ralphschindler.com> References: <547CEB74.9070807@ralphschindler.com> <54D1BF4B.30008@gmail.com> <55158859.5000606@ralphschindler.com> Date: Fri, 27 Mar 2015 17:50:38 +0100 Message-ID: To: Ralph Schindler Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a1134fe74939142051247eeb0 Subject: Re: [PHP-DEV] $http_response_header From: tyra3l@gmail.com (Ferenc Kovacs) --001a1134fe74939142051247eeb0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Mar 27, 2015 at 5:42 PM, Ralph Schindler wrote: > > About $php_errormsg , we have error_get_last(). >>>> About $http_response_headers, we have no replacement. >>>> >>>> Why not get rid of both ? >>>> >>> >>> I agree. Magically appearing variables are bad design and if we can get >>> rid of them, PHP 7 is the time. >>> >>> -- >>> Stas Malyshev >>> smalyshev@gmail.com >>> >>> >> did we miss the opportunity? >> > > Maybe so. Truthfully, I came to the conclusion I did not want to propose > removing $http_response_header unless we had a reasonable replacement for > the somewhat common workflow of file_get_contents('http://...'); then > usage of $http_response_header. > > I think there might be room to have added http_get_last_header(), or > something to that effect. > > yeah, but we already mentioned/discussed this that the removal would require introducing another way (eg. adding a method) for fetching the headers. I think that introducing this method can happen in a minor version(without removing the $http_response_header variable), so I will create a pull request and ask Julien about including it in 5.5 and upwards. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a1134fe74939142051247eeb0--