[PHP-DEV] Hello

2020-10-22 Thread Andreas Bittner
Hello everyone I've been a reader of internals for some years and would like to join the round. Unfortunately I have no experience implementing changes to the PHP source itself. I hope to find the time to work my way into php-src and hopefully contribute some RFCs and PRs in the future. Is

[PHP-DEV] Re: Is there any interest for object constructor shorthand *just forstdClass*

2020-10-23 Thread Andreas Bittner
e.g. `$x = object{key: object{'escaped-literal': $v2 }};` (equivalent to `$x = (object)['key' => (object)['escaped-literal' => $v2]];`) For example, in JS, non-string key literals are surrounded in `[]` to unambiguously reference them. Here, that could be `object{[$key]: $value, [MY_CONST]: $oth

Re: [PHP-DEV] Is there any interest for object constructor shorthand *just forstdClass*

2020-10-26 Thread Andreas Bittner
I don't follow; is the resulting JSON different if you cast to object, or is there some other reason you prefer an object over using an associative array directly? The by-reference semantics of objects vs arrays in PHP. *shrug* If you want things to be mutable between functions, stick an & in