On Sat, Apr 16, 2022 at 12:01 AM David Rodrigues
wrote:
> > $foo[?'maynotexist'] // returns null and emits no warning
>
> In JS we have some like:
>
> foo['maynotexist']
> foo?.['maynotexist']
>
> In PHP could be:
>
> $foo['maynotexist']
> $foo?->['maynotexist']
>
You seem to be confusing two di
> $foo[?'maynotexist'] // returns null and emits no warning
In JS we have some like:
foo['maynotexist']
foo?.['maynotexist']
In PHP could be:
$foo['maynotexist']
$foo?->['maynotexist']
Atenciosamente,
David Rodrigues
Em sex., 15 de abr. de 2022 às 18:41, Mark Randall
escreveu:
> On 06/04/2
On 06/04/2022 19:38, Larry Garfield wrote:
On the last point, regarding stdClass, I think the question is whether we want
it to be consistent with classed object properties (throw) or with associative
arrays (warnings). stdClass is kind of an uncomfortable middle between those
two. I'm not s
On Wed, Apr 6, 2022, at 7:03 AM, Mark Randall wrote:
> Internals,
>
> Part 2 of the undefined behaviour improvements, this time focusing on
> properties.
>
> https://wiki.php.net/rfc/undefined_property_error_promotion
>
> This RFC draws heavily from the just passed undefined variables error
> pro
On 06/04/2022 17:34, Marco Pivetta wrote:
Perhaps worth mentioning that magic methods keep working?
Good call.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
On Wed, 6 Apr 2022 at 14:37, Guilliam Xavier
wrote:
> First sentence of the introduction: "Undefined properties are those that
> have not yet been defined either by the presence of a property declaration,
> or by adding them to the properties hashmap through direct assignment, or
> by having them
Hey Mark,
On Wed, 6 Apr 2022 at 14:04, Mark Randall wrote:
> Internals,
>
> Part 2 of the undefined behaviour improvements, this time focusing on
> properties.
>
> https://wiki.php.net/rfc/undefined_property_error_promotion
>
> This RFC draws heavily from the just passed undefined variables err
On Wed, Apr 6, 2022 at 2:37 PM Robert Landers
wrote:
>
> FWIW, I'd like to see option 2 only because of custom serializers
> and/or object proxies and also because:
>
> > This RFC proposes that accessing an undefined property is rendered
> illegal behaviour
>
> StdClass has *no* defined propertie
Hi Mark,
https://wiki.php.net/rfc/undefined_property_error_promotion
>
[note: the RFC Date has a +1 on the year]
I'm in favor for "fixed" classes (with all properties declared and no
`__get()` magic method),
but somewhat mixed for `stdClass`: as you said, it can come from a
`json_decode()` by de
On Wed, Apr 6, 2022 at 2:04 PM Mark Randall wrote:
>
> Internals,
>
> Part 2 of the undefined behaviour improvements, this time focusing on
> properties.
>
> https://wiki.php.net/rfc/undefined_property_error_promotion
>
> This RFC draws heavily from the just passed undefined variables error
> prom
10 matches
Mail list logo