Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115641 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 70203 invoked from network); 6 Aug 2021 10:43:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Aug 2021 10:43:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7FA3A1804DB for ; Fri, 6 Aug 2021 04:13:08 -0700 (PDT) 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,URIBL_SBL,URIBL_SBL_A autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 6 Aug 2021 04:13:08 -0700 (PDT) Received: by mail-qt1-f177.google.com with SMTP id w10so6164751qtj.3 for ; Fri, 06 Aug 2021 04:13:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fTeRpCaOmcZhXfZWsSpTfypDRMsqPwC7y03LqkaVLrw=; b=pwm1TXubVbX9EF1l5fnmVifPqLTtHyL7KsEgevdAaw5236+nONhUeHncWucwE934Rn UxyrtJDPW1uhplf4kxnspq3ZqSbFhJqbOtaTpAEdB29ZjvGNFLtkcRv4rvRlJ5qel64g RSJAHVAFion5moBl1qZOZrwVeX4z8pTUQ/U/aCmTM2lngwZgZlWzphBZo6sCTLn4UUWL KABkLwD9IBCfaUd/2HLgC6bs5DMjb2cieA4d0Pi8jiWfeCszpNP77pG6Q8FcDnI3awMa cIFvUbKHzj6SUDn45LJwwqOqrFHrzIm0YNOndnycyib1sWKcrmaEOb+TCHtc7WdQcWA1 JTxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fTeRpCaOmcZhXfZWsSpTfypDRMsqPwC7y03LqkaVLrw=; b=cbQ6MotmKw9hTATtPBFh0sT/CUWtlMiglxedpr23IU8AOUYoDLoh13S+63cvoduqZx VIi+1gzn5YO4Z562ymF3QO/TuxOvqXA09a6zuKl16AhGKsyAKj48Za7gK9pAccCUDsfK puTbB1SPvrUKuClQ69ZS2PXHOppu6+takQllToYgAW0Jnlqyd52nhsFWiwhigX2NfzlR cZN96m6QiqNbmFCGQC8fDOKg3KhOYNPWtT3vkJxbOLVrm/WruWhUb9YSKunYGxwhyolz yG5Sk8CcRWTgqPgjjuRKD+FjIW0QjvVIPAth3hpuS1VT8OPM7A7YJsLSrlHIQJsn4meV LZKw== X-Gm-Message-State: AOAM530u9M45L2hldq2ffAlUlfWCvKg3W8RxxLZ0NJ8khwZuBp+VF16L JnsUCVrxlKFrN3tTLR4IyT9/CEFX/yJoLsBWQ3g= X-Google-Smtp-Source: ABdhPJzXfsywkwz8QtqIj77WAnZtva4O6mhUVrxSiuWx5VHUzY3gpS0WYKx+CMphGqD/tQia1iG8pAYLsaT570vf6ss= X-Received: by 2002:ac8:734b:: with SMTP id q11mr8589615qtp.105.1628248387628; Fri, 06 Aug 2021 04:13:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 6 Aug 2021 12:12:58 +0100 Message-ID: To: Hans Henrik Bergan Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000c0346505c8e21e27" Subject: Re: [PHP-DEV] [RFC] Add parse_query_string as an alternative to parse_str From: tekiela246@gmail.com (Kamil Tekiela) --000000000000c0346505c8e21e27 Content-Type: text/plain; charset="UTF-8" btw why isn't foo.bar=123 decoded to array("foo.bar"=>123); ? > this looks pretty bad to me https://3v4l.org/6Wa23 Hi Hans, This is because variables in PHP that contain the concatenation operator or space are much more difficult to access. See https://3v4l.org/vUBWK As the primary purpose of parse_str was to register globals from a query string, it follows the same logic as your normal POST/GET/COOKIE parsing. See https://stackoverflow.com/a/68742/1839439 Perhaps, instead of adjusting this behaviour only for the new function, we could remove this behaviour as a whole, given that it is a remainder of the long-forgotten register globals? I don't see any use for it anymore, as all parsed input is only available in the form of an associative array. People who extract $_POST can suffer the consequences of their own actions... Regards, Kamil --000000000000c0346505c8e21e27--