Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108520 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 1338 invoked from network); 12 Feb 2020 23:26:45 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Feb 2020 23:26:45 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 28E7E1804E6 for ; Wed, 12 Feb 2020 13:41:01 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8943 85.119.80.0/21 X-Spam-Virus: No X-Envelope-From: Received: from mail.apserver.co.uk (server2.alteredperspective.co.uk [85.119.82.103]) by php-smtp4.php.net (Postfix) with ESMTP for ; Wed, 12 Feb 2020 13:41:00 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.apserver.co.uk (Postfix) with ESMTP id 451774F4064; Wed, 12 Feb 2020 21:40:20 +0000 (GMT) Received: from mail.apserver.co.uk ([127.0.0.1]) by localhost (server2.alteredperspective.co.uk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TCBd-jq9qd9U; Wed, 12 Feb 2020 21:40:18 +0000 (GMT) Received: from [192.168.0.7] (unknown [86.18.119.17]) by mail.apserver.co.uk (Postfix) with ESMTPA id 787AE4F4061; Wed, 12 Feb 2020 21:40:18 +0000 (GMT) To: Niklas Keller , "Paul M. Jones" , PHP Internals References: <50BD013E-CF72-414C-BBC0-A7A2E45CBDDB@pmjones.io> Message-ID: <90a01e04-4450-8496-5823-13d9042f6bd5@allenjb.me.uk> Date: Wed, 12 Feb 2020 21:40:57 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [PHP-DEV] RFC: Server-Side Request and Response Objects (v2) From: php.lists@allenjb.me.uk (AllenJB) On 12/02/2020 18:20, Niklas Keller wrote: > Type Safety > > I think the API should be type safe. Currently $request->get['key'] > can be null | string | string[] | ... Most parameters only appear a > single time, so a method returning the first parameter value or null > could be used instead. I may be misunderstanding what you're suggesting here, but it seems you're proposing to have ->get['key'] only return null|string, getting rid of the arrays of parameter values ( ?key[]=value1&key[]=value2 ) functionality here. (And I assume you intend the same for ->post['key'] ) If so, I would say this is a bad idea. I and a lot of other devs use this functionality frequently (more often in POST, but often enough in GET for purposes such as search pages). And how would multiple select inputs be handled? AllenJB