-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
From: https://wiki.php.net/internals/engine/objects
Most likely, the default clone_obj handler will have to be replaced because it assumes the create_object class entry handler is not replaced and directly allocates a standard zend_object data structure. Therefore, worse than the added custom fields to the object structure not being initialized (because the clone handler only knows how to so a shadow copy of the standard properties), these fields will not even exist because only a plain zend_object is allocated.
You may also choose not to support the clone operation by setting the clone_obj handler to NULL.
Whether we decide to support cloning or not, we should explicitly assign a value to the handler.
- related to
-
PHPC-1627 Support object cloning for ReadConcern, ReadPreference, and WriteConcern
- Backlog