Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78351 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47313 invoked from network); 26 Oct 2014 18:31:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Oct 2014 18:31:15 -0000 Authentication-Results: pb1.pair.com header.from=catch.dave@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=catch.dave@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.41 as permitted sender) X-PHP-List-Original-Sender: catch.dave@gmail.com X-Host-Fingerprint: 74.125.82.41 mail-wg0-f41.google.com Received: from [74.125.82.41] ([74.125.82.41:40116] helo=mail-wg0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/2F-36207-1FD3D445 for ; Sun, 26 Oct 2014 13:31:14 -0500 Received: by mail-wg0-f41.google.com with SMTP id b13so4252113wgh.24 for ; Sun, 26 Oct 2014 11:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=lMkIeoApv3Ly6KW0UXwTsBDG+Pszcg2a/hQePG41Zec=; b=0nYoqD8i8XLVJ1ZHIDhZclWnLk2bC2wbQXpn99LQG6RJCtGckRUsuhwe+0sBxDxb6C SUPI4wbtEqz7V71Tfy5y6QS2VGbUuFN+QjuBCZyuJA6+wqItZoeAXpsUHDHxHd0JIoud DDLAqrNXlZ3rz2sDDGumYpSlz/6NTunw1VMNF7FiAPxIyXPsv4oMWwQYa1icY25TVcY7 XRdCXoqoLZfdPtV1xO1PnkTwANBoxQ+0gBneE8BM7a4+YLnIa323Aj1r43eljPUanlrI zxfGaiO1Fd6F+DErQ+zz1mJfH8DUxffVOYZbWRQV3Z2J/EZpFRlY0JDsTI0SYbbdLDmE tLLA== X-Received: by 10.194.201.198 with SMTP id kc6mr3138302wjc.77.1414348270368; Sun, 26 Oct 2014 11:31:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.76.148 with HTTP; Sun, 26 Oct 2014 11:30:50 -0700 (PDT) In-Reply-To: <57b7a3681d6c2c7ae123c8921b2d19d6@mail.gmail.com> References: <776669CE-9E8C-4069-9834-C7275CCA0EF4@ajf.me> <8CB055D4-F164-4DF3-B019-684BAE7E016E@ajf.me> <543D47C1.9050009@lerdorf.com> <543D4CE1.5000109@lerdorf.com> <543D6864.10508@gmail.com> <543D85E6.2020507@lerdorf.com> <57b7a3681d6c2c7ae123c8921b2d19d6@mail.gmail.com> Date: Sun, 26 Oct 2014 11:30:50 -0700 Message-ID: To: Zeev Suraski Cc: Kris Craig , Rasmus Lerdorf , Rowan Collins , PHP internals list Content-Type: multipart/alternative; boundary=047d7bb708a03e7eaa0506579efd Subject: Re: [PHP-DEV] New globals for PUT and DELETE From: catch.dave@gmail.com (Dave) --047d7bb708a03e7eaa0506579efd Content-Type: text/plain; charset=UTF-8 > there's really nothing missing from PHP today to enable successful & easy implementation of RESTful interfaces. Zeev, I could not create a REST interface that accepted "multipart form data" in uploading a file and form data in one PUT request. This is a valid part of a RESTful interface, yet PHP does not provide parsed data and file data for PUT like it does for POST (in the form of $_FILES and $_POST). The only way to do this in PHP now is write a userland function that parses multipart form data, which is non-trivial. I had written one, but would rather rely on the more-well tested parser which exists in PHP itself for POST. (A side-note: in my case it was deemed less risky to employ a load-balancer hack instead). Having the ability to access the data provided in $_POST for other methods is ideal (by whatever means: $_PUT, $_FORM, get_parsed_form_data(), etc). Dave. On 14 October 2014 14:56, Zeev Suraski wrote: > > Personally, I like the idea of using more appropriately named aliases, > > particularly if they're roughly the same number of characters. However, > > we > > would need to allow at least several years for people to adopt the new > > globals before deprecating $_GET and $_POST. Ultimately, they will > either > > need to be deprecated or the $_PUT and $_DELETE aliases will need to be > > added, otherwise the issue I raised would remain unresolved. > > Kris, > > Don't get this the wrong way, but $_GET and $_POST are not going to be > deprecated. > > Whether or not we need $_PUT or $_DELETE is a separate, independent > question > from the axiom that $_GET and $_POST are here to stay. Personally, I don't > think they make sense as Rasmus pointed out that $_GET and $_POST were > never > about HTTP methods but form methods, and there's really nothing missing > from > PHP today to enable successful & easy implementation of RESTful interfaces. > > Zeev > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --047d7bb708a03e7eaa0506579efd--