Skip to content

Conversation

nielsdos
Copy link
Member

@nielsdos nielsdos commented Jan 2, 2023

Analysis is in GH-10200.
This restores the behaviour of PHP<8.2.

I manually checked the other places where 90b7bde made modifications, but they look alright to me. I think this is the only bug that was introduced back then.

One little oddity remains (that was already present in older PHP versions):
According to the man page of get_object_vars:

Returns an associative array of defined object accessible non-static properties for the specified object in scope.

I guess that might be a bit confusing because for example we can see in the test example here the keys are all integer indices.

nielsdos and others added 2 commits January 2, 2023 15:34
… (1<<2)) != 0)' failed.

This occurs because the array of properties is a single element with an
integer key, not an associative array. Therefore it is a packed array
and thus the assumption the iteration macro makes is invalid.

This restores the behaviour of PHP<8.2.
Co-authored-by: Deltik <deltik@gmx.com>
Girgias pushed a commit that referenced this pull request Jan 2, 2023
…<<2)) != 0)' failed.

This occurs because the array of properties is a single element with an
integer key, not an associative array. Therefore it is a packed array
and thus the assumption the iteration macro makes is invalid.

This restores the behaviour of PHP<8.2.

Closes GH-10209

Co-authored-by: Deltik <deltik@gmx.com>

Signed-off-by: George Peter Banyard <girgias@php.net>
@Girgias Girgias closed this in a3d2c33 Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants