You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't build prop table during json_encode(JsonSerializable)
Save memory and time by not building/updating the property table.
When performing infinite recursion detection on objects,
always check it on the object rather than its property table.
This reduces the additional memory usage for both internal and userland
implementations of JsonSerializable caused by json_encode.
It does this by avoiding creating the properties table for the first time.
(Classes such as SplFixedArray both implement JsonSerializable and override
get_properties)
This change also makes the method of infinite recursion detection consistent
with the special case for standard classes from
f9f8c1c
0 commit comments