Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108431 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 92090 invoked from network); 9 Feb 2020 23:20:20 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Feb 2020 23:20:20 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9AE241804F4 for ; Sun, 9 Feb 2020 13:33:48 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) (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 ; Sun, 9 Feb 2020 13:33:47 -0800 (PST) Received: by mail-yb1-f175.google.com with SMTP id k69so2675171ybk.4 for ; Sun, 09 Feb 2020 13:33:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=H0p28m2NxEMaqhHLy4CnMlUw+sGs31j/ZTVfGBCBYV4=; b=VyIgBhs6hZ/PvZl51qD4YBdO+yE+ta+DgQBN4BVsd2qoISIHj3gbbMoZJ77bjHedb4 gCLSBd0wVNJsBbtQUvQGbcsF2pKbsJkq58II4YwRJ6zo2djWvXylJVhG7JQOAhG10iFG cQgxKNCaJfe+El7+ou9zAxm000PLHscnpXrMrEELHdRV5MOWQoiYrgqz4Yr2/lA3MobX AactiOC2l7sNJPtYpWhWVMltnjLUyklBFjOyE28rDmHFMrychvJmU33OzS/jbl1zQwju XJ9+3i/oLd4rzr3W3kBHTxzkEiRVUkCAytVFEjyGNsHpl0B+9gXZg7IAk6hhEqD8sXnS MpEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=H0p28m2NxEMaqhHLy4CnMlUw+sGs31j/ZTVfGBCBYV4=; b=qbWBupbaUdsLjBAfoI+GvvIMGPIUZy0pFAAO/uxMIKNj3MZtQZoXdOk3XDfu4Xz1xE bC8TH/tOyJ7scRhFIYJD+kbz1DdR145mvNgeqNsZheFelJDBvH7bjMY1y4XdcCMUvjel X4u8X5O4H/cF65l5hFNOjgJWf++fO8ERbRg7drU27dZBS9DWrxS6+4wfHkA9E7rHGbf0 xHm6wBOM8EqDrgt+9tdCVOl5aGR/uLvl7YOQyyehUapmLDZFCagGAn8h6vGKu68N5jTs Ux0jMgPQUrqpWNnLHmnA89nejrDhjvzQxmhrZ1vJ0YFik1KevPOMm9+PrCJjOEmckYzz ZWcQ== X-Gm-Message-State: APjAAAWR+pR2ouPilBZbD5ixaADBkq44cEVyALLCCRZ6SPTdYzONTMpV nmn3evJCpfE6YWLGMnzOQnDmMQ== X-Google-Smtp-Source: APXvYqxraxjX9T9mRoQTuamjJQFpzybge/WnCe8enpa5ZysSUqMch97i3hq3IE0YjbbWUJzRXzSPgw== X-Received: by 2002:a25:7d85:: with SMTP id y127mr8050387ybc.486.1581284026498; Sun, 09 Feb 2020 13:33:46 -0800 (PST) Received: from ?IPv6:2601:c0:c680:5cc0:3433:f236:94ed:3c12? ([2601:c0:c680:5cc0:3433:f236:94ed:3c12]) by smtp.gmail.com with ESMTPSA id l39sm4608364ywk.36.2020.02.09.13.33.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Feb 2020 13:33:45 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) In-Reply-To: Date: Sun, 9 Feb 2020 16:33:44 -0500 Cc: "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: <9C0A5E79-6925-43B4-84C6-A2DA007A9F1A@newclarity.net> References: To: tyson andre X-Mailer: Apple Mail (2.3445.104.11) Subject: Re: [PHP-DEV] [RFC] Allow calls to global functions in constant expressions From: mike@newclarity.net (Mike Schinkel) > On Feb 9, 2020, at 4:02 PM, tyson andre = wrote: >=20 > https://wiki.php.net/rfc/calls_in_constant_expressions has been = updated and moved to > "Under Discussion". >=20 > This proposes allowing function calls in constant declarations, static = property defaults, > static variables, and parameter defaults. > It includes a secondary voting option to allow any function calls, > and not just a small set of whitelisted core functions. > Other expression types would continue to be forbidden in constant = expressions (variables, method calls, etc) >=20 > Let me know if you have any comments on the RFC or implementation. 1. Why again are MyClass::methodName() not considered for the = non-whitelist vote? =20 Seems to me a developer would be more inclined to implement the = expressions that define the class constant's value in a method of the = class than in an external function. 2. Do we really want to add a standard library function 53 characters = long? =20 Can we not come up with a more concise name than = get_defined_functions_allowed_in_constant_expressions(), like maybe = get_const_expr_funcs() or get_const_expressions()? -Mike=