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 <std_disclaimer.h>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to