Hi Kosit, On Sat, 21 Sep 2019 at 10:56, Kosit Supanyo <webdevxp....@gmail.com> wrote: > > global $$x; > global $$$y; > global $$$$z; > global ${'abc'}; > global $$$$$$$$$${random_int(0, PHP_INT_MAX)};
I have found the form `global ${'abc'};` useful in the past to work around the limits on what PHP can parse as variable names, to allow naming global settings to match how I like to write them in config files e.g. 'image.upload.retry_attempts'. I would be very surprised if there was no codebase in existence that didn't use the other forms, for better or worse. > If not, should this be changed to ... For changes like this, the conversation almost certainly needs to start by stating a clear problem something is causing, and then lead on to why doing a suggested solution is the right thing to do. Although this might be a small inconsistency in the language, by itself, I can't see it causing much harm, except maybe for performance optimisation as trying to analyze what variables are being used in the code is hard. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php