On Sat, Sep 21, 2019 at 6:18 PM Kosit Supanyo
wrote:
> Unlike var, public, static and others - 'global' is not a declaration of
>> class structure, but a way to access global variables.
>
>
> I know it is not and I think almost everyone knows that. As I said, I came
> up with this by comparing to
>
> Unlike var, public, static and others - 'global' is not a declaration of
> class structure, but a way to access global variables.
I know it is not and I think almost everyone knows that. As I said, I came
up with this by comparing to other declarations syntactically not
functionally, it is in
On Sat, Sep 21, 2019 at 3:09 PM Kosit Supanyo
wrote:
> I understand your point but inconsistency in my sense is syntactical By
> comparing to other declaration syntax like `var`, `static`, 'public` an
> others. They allow only T_VARIABLE but `global` is different. And there's
> another way to arc
I understand your point but inconsistency in my sense is syntactical By
comparing to other declaration syntax like `var`, `static`, 'public` an
others. They allow only T_VARIABLE but `global` is different. And there's
another way to archive the same goal through `$GLOBALS`, that's why I see
it as i
On Sat, Sep 21, 2019 at 12:58 PM Kosit Supanyo
wrote:
> Hi Dan and Internals
>
> Sorry Dan, I forgot to include @Internals in previous reply so let me
> resend this again.
>
> Thank you for your reply. I see, but in that case it can be done with
> `$GLOBALS['abc']` right? So I don't see any bene
Hi Dan and Internals
Sorry Dan, I forgot to include @Internals in previous reply so let me
resend this again.
Thank you for your reply. I see, but in that case it can be done with
`$GLOBALS['abc']` right? So I don't see any benefits of allowing those
forms, they're just another inconsistency tha
On Sat, Sep 21, 2019 at 11:56 AM Kosit Supanyo
wrote:
> Hi Internals
>
> I'm working on my new proposals and I've found weirdness of global variable
> declaration in zend_language_parser.y.
>
> global_var:
> simple_variable
> { $$ = zend_ast_create(ZEND_AST_GLOBAL,
> zend_ast_create(Z
Hi Kosit,
On Sat, 21 Sep 2019 at 10:56, Kosit Supanyo 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
Hi Internals
I'm working on my new proposals and I've found weirdness of global variable
declaration in zend_language_parser.y.
global_var:
simple_variable
{ $$ = zend_ast_create(ZEND_AST_GLOBAL,
zend_ast_create(ZEND_AST_VAR, $1)); }
;
Above grammer allows something like this...
glo