Skip to content

Conversation

@NickSdot
Copy link
Contributor

@NickSdot NickSdot commented Oct 30, 2025

Follow up to #57557 as discussed in the comments.

Approach does not change compared to 57557. But in 8.4 we get an advantage because:

  • No unnecessary get_object_vars() call; avoids duplicate work.
  • Collects desired keys instead of having a call to unset() for each undesired property.
  • No unnecessary array_keys() call

Makes it slightly faster (~25%) and a bit cleaner. Nothing massive, but things add up.
Since it's a fresh feature it doesn't hurt to squeeze what we can.

Addtionally:

@taylorotwell
Copy link
Member

Missing doc-blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants