Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119709 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 99024 invoked from network); 15 Mar 2023 12:16:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Mar 2023 12:16:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9312D1804F2 for ; Wed, 15 Mar 2023 05:16:26 -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.8 required=5.0 tests=BAYES_50,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8468 78.32.0.0/15 X-Spam-Virus: No X-Envelope-From: Received: from mint.phcomp.co.uk (freshmint.phcomp.co.uk [78.32.209.33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 15 Mar 2023 05:16:25 -0700 (PDT) Received: from addw by mint.phcomp.co.uk with local (Exim 4.92) (envelope-from ) id 1pcQ3M-0004qU-1z for internals@lists.php.net; Wed, 15 Mar 2023 12:16:24 +0000 Date: Wed, 15 Mar 2023 12:16:24 +0000 To: internals@lists.php.net Message-ID: <20230315121623.GK2480@phcomp.co.uk> Mail-Followup-To: internals@lists.php.net References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Organization: Parliament Hill Computers Ltd User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [PHP-DEV] [RFC][Vote announcement] Arbitrary static variable initializers From: addw@phcomp.co.uk (Alain D D Williams) On Wed, Mar 15, 2023 at 01:02:04PM +0100, Ilija Tovilo wrote: > Hi everybody > > It's been a while since I've announced this RFC. > https://wiki.php.net/rfc/arbitrary_static_variable_initializers > https://externals.io/message/118976 > > There haven't been many responses, so I'd like to put this to a vote > early next week. Could I suggest that you make something like the following throw an error: function foo($i) { static $a = $b + 1; static $b = $i; } You could try to reorder but what if the second static had been: static $b = $i + $a; Yes: stupid, but someone will try it. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 https://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: https://www.phcomp.co.uk/Contact.html #include