Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129624 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id E45E61A00BC for ; Tue, 16 Dec 2025 18:14:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1765908875; bh=0yLN4l6hDQQ63I+KjysVLAq51Q4HkqawWYMVA40rg8I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DpjOFZopkgBj74FqEO9OAc9W6kveCqbBH5vWzC6iep0LJV2ntYnRrIbm+ptalCQO1 wahdbzoriBPgp1cAzvvRIFBYn1BiDizc97iqtdmCWT7RLTM8RSZrbLEaxV7iyS39qH RAxGVYklG83dTgEFiNTk39GTgNBnGweucKUOIp70kHaNfPGyBxvGZNkJcZF1OBSDxJ qcmP0qoaKVdGv9m/Atb+eO18hrPrxqm052uzYZ5fIfG7m5IY8uz+C+6HyKvapHFDP8 wiw2gaeEtNbbKvv+5T2i7EPNUoLeGfddUjDySgzArDynX10jyaz7jO1VfJQpKUq2PP TDGapGAytuZkg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 40CB41801ED for ; Tue, 16 Dec 2025 18:14:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING, HTML_MESSAGE,PDS_PRO_TLD,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from iguana.tulip.relay.mailchannels.net (iguana.tulip.relay.mailchannels.net [23.83.218.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 16 Dec 2025 18:14:33 +0000 (UTC) X-Sender-Id: yszpovajlk|x-authuser|juris@glaive.pro Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 12C67822981; Tue, 16 Dec 2025 18:14:28 +0000 (UTC) Received: from server52.areait.lv (100-107-170-83.trex-nlb.outbound.svc.cluster.local [100.107.170.83]) (Authenticated sender: yszpovajlk) by relay.mailchannels.net (Postfix) with ESMTPA id DD39082266B; Tue, 16 Dec 2025 18:14:26 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; d=mailchannels.net; s=arc-2022; cv=none; t=1765908867; b=74QFcZidIxTQ9wmpjV70lRj118FTY4pah8q3GA/yEJp8mJncvSmw6/DjJDPFW9Wx1hZO7y qaigTDmit/aNSXA4GPrwezsyFFspE3+RGw1FbfA5CW+0TmvQ9f84qpiP7VUb8AekhhNXi3 oI1HBUZWhrY14XAWJAWMweVNdM3ilTLhI+NsFT8f3lInvjnkxP/Mfis+NBNwwiSVKdKzms EzbGbBSetynXv911c0zYzHV5OwEDnw6wnNf7lJzTSL30+yLEvyMC7LuuENkem735+lwL8n jmkcDLTYYLMBMD165cW3QdBTDi122nq6Y9sGFiUPQY+sCyaBC4GagwdzDDcNuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1765908867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9IrU8V9bNYv/RTeAx7Y4BtxAnWq5xc75lV903vXVK+I=; b=r2LO1pcGYobgn7c9Lmnx5Y/5m+hJOXAztEIOo3sagQ7igd5GKkFivRJE5ZMb+DMNOtWNCu aJOQa14712c2OlWfgWyI+btibwP3ly/5pntj9UtM6qRBLTkI8xeM81l/FXN9oN7Q7rfsVE DEpJ28wGYWQUOUJQkKiCe6AKsYtG6h+0hFuU6gjtt6wkJn4J/1E/diN2AaLApkqcrIAVt/ +2riPPmiHORgGHzcQchOJEx8r1t1W1kkTIKvleTr8r6HO+StHtvHtdpk/vffGaovKEfWF5 8VkwrfVeOSAkkK44tS4KUzcvw+zwmJjveojLU33yZ/AP8Ht4OqqeNDywqSilmw== ARC-Authentication-Results: i=1; rspamd-6ccd5b4cc5-r97t4; auth=pass smtp.auth=yszpovajlk smtp.mailfrom=juris@glaive.pro X-Sender-Id: yszpovajlk|x-authuser|juris@glaive.pro X-MC-Relay: Neutral X-MailChannels-SenderId: yszpovajlk|x-authuser|juris@glaive.pro X-MailChannels-Auth-Id: yszpovajlk X-Towering-Tank: 363cf05725e6f85a_1765908867661_3459889335 X-MC-Loop-Signature: 1765908867660:3359756433 X-MC-Ingress-Time: 1765908867660 Received: from server52.areait.lv (server52.areait.lv [83.149.95.205]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.107.170.83 (trex/7.1.3); Tue, 16 Dec 2025 18:14:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=glaive.pro; s=default; h=Content-Type:Message-ID:References:In-Reply-To:Subject:Cc:To: From:Date:MIME-Version:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=9IrU8V9bNYv/RTeAx7Y4BtxAnWq5xc75lV903vXVK+I=; b=FoLMeoB+xWueJTEAa5O2ZJLI8w lYZUZBGB50hLBtNxUM1ER019AhHJseMCBp9k07mJWC7xIDDv4TXVJgrd1bfaaQdzF+yOUe2e+9b+s gH/oBlFuzJvZY4SQVzpFq/G/mnkhGgLRXT3pRFhBR5IuoXksVHBJd8JtnwT8pOr2VxmmvJadvGpo1 Ft5P10rwtyVhahA7ARrx7iVTa9uwRFC337Dw6vm7p1G+Y5YtODDSN3mpwdPgXE0ERMiRI1/Tai7ku RJfdjMS0hUG6+Cmu+OVYcBXotd+7b1IWVY0GGwIyLGGilf++U5XZv+3sHdJMQLyqsZiFWt7lQWr4F LWrcGd/w==; Received: from [::1] (port=48504 helo=glaive.pro) by server52.areait.lv with esmtpa (Exim 4.99) (envelope-from ) id 1vVZYz-0000000H6OU-0tJc; Tue, 16 Dec 2025 20:14:24 +0200 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Tue, 16 Dec 2025 20:14:19 +0200 To: ignace nyamagana butera Cc: PHP Internals List Subject: Re: [PHP-DEV] [RFC] [Discussion] Followup Improvements for ext/uri In-Reply-To: References: <83238ad3-c844-4457-dfb3-11321787e022@php.net> User-Agent: Roundcube Webmail/1.4.8 Message-ID: X-Sender: juris@glaive.pro Organization: SIA "Glaive.pro" Content-Type: multipart/alternative; boundary="=_4b41a68d24da1af8004eb26a890d52c5" X-AuthUser: juris@glaive.pro From: juris@glaive.pro (Juris Evertovskis) --=_4b41a68d24da1af8004eb26a890d52c5 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 2025-12-16 09:53, ignace nyamagana butera wrote: > Since we will be dealing with arrays the following rules could be > updated when parsing the string using PHP behaviour: > > * "&a" should be converted to ['a' => null] Hey Ignace, In practice valueless arguments like `?debug` are most often "flags" or "booleans" and their presence implies truthiness. Do you think it would be wrong or confusing to have it converted to `['debug' => true]`? I'm worried that `['a' => null]` would not be that handy since both `$params['a']` and `isset($params['a'])` would return falsy which would likely be opposite to the intended value. BR, Juris --=_4b41a68d24da1af8004eb26a890d52c5 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8

On 2025-12-16 09:53, ignace nyamagana butera wrote:

Since we will be dealing with arrays the following rules could be upda= ted when parsing the string using PHP behaviour:
  • "&a" should be converted to ['a' =3D> null]

Hey Ignace,

In practice valueless arguments like `?debug` are most often "flags" or = "booleans" and their presence implies truthiness.

Do you think it would be wrong or confusing to have it converted to `['d= ebug' =3D> true]`?

I'm worried that `['a' =3D> null]` would not be that handy since both= `$params['a']` and `isset($params['a'])` would return falsy which would li= kely be opposite to the intended value.

BR,
Juris

--=_4b41a68d24da1af8004eb26a890d52c5--