Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125286 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 qa.php.net (Postfix) with ESMTPS id 0D0941A00BD for ; Mon, 26 Aug 2024 18:50:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724698313; bh=1GJBSnB7Y5XvT4yuO6JuSzDwTW/0fbJGU/+kNJXG2Ts=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=m+J+bLZb5xlSzDNfZZOm5FbV1JcvTrCjp0O3X7JuSK3VwP/rmANqtKXH1XSSIufn7 8Z6B3EWKk8E2RGvw1q6r3iWLBPHGZBAPxw2AKdNuxCWcHfhH/qfkipCtHQiu8J1WWD itjGczA306/SLqmaamWDemkVqQX72l3n/Vute98Y6tUiuy2te0L+FKebWudhNrLHAa 7r/cj+GiawAn3dzfOcRS14Gm6Zgcf1XIlAOTNgy9VcMPQ66ANwnTHgtCr7meEwIm/H VEPphHHDMS4YBe+fTp3C5VkzR83vmdkdTBXTSaGc35jrHEgv8yUiLyhCUmMol8sBbL FB2zFYEvFdSrw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BE84718005B for ; Mon, 26 Aug 2024 18:51:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: **** X-Spam-Status: No, score=4.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RCVD_IN_SBL_CSS,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) (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 ; Mon, 26 Aug 2024 18:51:52 +0000 (UTC) Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-e0b7efa1c1bso4604314276.3 for ; Mon, 26 Aug 2024 11:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coggenterprises-com.20230601.gappssmtp.com; s=20230601; t=1724698199; x=1725302999; darn=lists.php.net; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=1GJBSnB7Y5XvT4yuO6JuSzDwTW/0fbJGU/+kNJXG2Ts=; b=eD4A/DWy9iBwPf4a1XPXLtX/HNwr5yaAaihpI8jzJBrX4QVQ2zYzwCiMYYvfHKhASc +Z+sW+iGRbnX1tiH14+ADDXSZJSpslFLA656QHRg7e7nB4Wg+ogc/iJGkTn2RSslbflb lZxNO2x0BFUpI1DPjL9m1Rb0o3q+/ioVimgNSbH7C3tV7l0mhv+UgDx4kKoa3rEMyjGM P93+20G+k8LUEmPC7DIGaow4ZvSeAU0vRu6HKA+ubxtzIgtBMMoVAaPGeaNn9asZyNO+ FidI5NzG/T5w8UkgBvqAJTcrzp5SwyyWdTpZzV+Jzpe1SU15G7SVhBabakNIdVunB96A rfug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724698199; x=1725302999; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1GJBSnB7Y5XvT4yuO6JuSzDwTW/0fbJGU/+kNJXG2Ts=; b=alnJ+fmvT5YEnlR92EzviClZQKpEUztrmeiNKrHEBv1uz/xEf3YiIdEL37OOO2ly32 mFw5CwSVPNjEaEaO/s6b1AYyEGyVfECs9QW65fQ125hJFlzzQzUocLCoMMOWUhRjDJwO fGWfw4SKpoZpYzh/7A5+1Y95fr/+PcU0qo6KJHDny+LQ4TWnE5Ol7bjKYVSNUroXPYse OES3AqhqazgnE3GX4U4z8rQWWSrivfE35HeQFt9ez0PkUy0otB08Tf9vpIKJXwDfelvz XaisQvlD6Op4p5FwgWieIAHJ5dhSFsqVixcTUbYuFrm10qfmlJrl/YZAlt+RXaTG5T8V JEXA== X-Gm-Message-State: AOJu0YxKUQYymYxiY8y8lEuzuUvPlbtPZIRsU+9zxPwkgc6VCZYHuHyp vu0tyX08tL5K5XDcVIbPlYhUV82xJPLGEgJC5xbHWq5kHILsloJh3sIlV97gFVQBS6u95EW7eQl W X-Google-Smtp-Source: AGHT+IFwYpzEX5E1egq22aVmeL4QZ86dZ1sjzArnOSsHlgtUAXi1vr8REwpifSK6rQGkpsNGMO93hw== X-Received: by 2002:a05:6902:2709:b0:e11:6671:4054 with SMTP id 3f1490d57ef6-e17a83b2de4mr13798121276.3.1724698198490; Mon, 26 Aug 2024 11:49:58 -0700 (PDT) Received: from Johns-MacBook-Pro-2.local ([207.213.210.67]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e178e56992fsm2169698276.49.2024.08.26.11.49.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Aug 2024 11:49:57 -0700 (PDT) Date: Mon, 26 Aug 2024 14:49:56 -0400 To: Bilge Cc: "=?utf-8?Q?internals=40lists.php.net?=" Message-ID: <8F591468-848C-413A-AD2C-47E003B56BEE@getmailspring.com> In-Reply-To: <1c2cb0d4-ecf2-41c7-9f31-e90f1bee3805@scriptfusion.com> References: <1c2cb0d4-ecf2-41c7-9f31-e90f1bee3805@scriptfusion.com> Subject: Re: [PHP-DEV] [RFC] Default expression X-Mailer: Mailspring Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="66ccce54_643c9869_12a23" From: john@coggeshall.org (John Coggeshall) --66ccce54_643c9869_12a23 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Aug 26 2024, at 2:39 pm, Bilge wrote: > > I like this approach. I'm still not sure I'd want to pursue adding exclusions, but if we can identify something that's obviously bad and/or dangerous then we can consider that short list for exclusion. That is much more compelling than starting out by banning everything and arbitrarily whitelisting those things someone personally has a use for. Perhaps the answer could be to only allow the use of default when the assigned default value is a scalar value -- no objects, arrays, enums, etc (and no mixed ).. It seems like a compromise that accomplishes a healthy portion of the stated use-cases while avoiding many of the foot-guns scenarios. Coogle (PS - I'm going to start signing off with my old-skool nickname around here, feel free to reference me using it to disambiguate since there are multiple Johns) --66ccce54_643c9869_12a23 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

On Aug 26 2024, at= 2:39 pm, Bilge <bilge=40scriptfusion.com> wrote:
=
I like this approach. I'm still not sure I'd want to pursue addi= ng exclusions, but if we can identify something that's obviously bad and/= or dangerous then we can consider that short list for exclusion. That is = much more compelling than starting out by banning everything and arbitrar= ily whitelisting those things someone personally has a use for.

Perhaps the answer could be to only allow the use of default  when the assigned default value is a scalar valu= e -- no objects, arrays, enums, etc (and no mixed ).. I= t seems like a compromise that accomplishes a healthy portion of the stat= ed use-cases while avoiding many of the foot-guns scenarios.

Coogle
(PS - I'm going to start signing off with my old-skool= nickname around here, feel free to reference me using it to disambiguate= since there are multiple Johns)

--66ccce54_643c9869_12a23--