internals:engine:objects

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
internals:engine:objects [2011/06/23 13:00]
cataphract [clone_obj]
internals:engine:objects [2017/09/22 13:28] (current)
Line 80: Line 80:
   * Called when an object is to be cloned (associated with usage of the ''​clone''​ operator in user space).   * Called when an object is to be cloned (associated with usage of the ''​clone''​ operator in user space).
   * Should return a ''​zend_object_value''​ that refers to a newly created object that is equal to the object referred to the passed reference. The two objects should not be identical, i.e., ''​==''​ applied to the references should return ''​true''​ but ''​===''​ should return ''​false''​. The ''​[[#​compare_objects|compare_objects]]''​ handlers must be the same since that is a requisite for ''​==''​ returning ''​true'',​ but typically, as one would want the two objects to have identical behavior, they ought to share all the handlers.   * Should return a ''​zend_object_value''​ that refers to a newly created object that is equal to the object referred to the passed reference. The two objects should not be identical, i.e., ''​==''​ applied to the references should return ''​true''​ but ''​===''​ should return ''​false''​. The ''​[[#​compare_objects|compare_objects]]''​ handlers must be the same since that is a requisite for ''​==''​ returning ''​true'',​ but typically, as one would want the two objects to have identical behavior, they ought to share all the handlers.
-  * Zend standard object extensions can call ''​zend_objects_clone_members''​ to copy properties; this functions ​also calls the class entry ''​clone''​ function (typically ''​__clone''​).+  * Zend standard object extensions can call ''​zend_objects_clone_members''​ to copy properties; this function ​also calls the class entry ''​clone''​ function (typically ''​%%__clone%%''​).
   * The created object should be initialized as if it had one reference.   * The created object should be initialized as if it had one reference.
   * May be ''​NULL''​ to forbid cloning.   * May be ''​NULL''​ to forbid cloning.
internals/engine/objects.1308834008.txt.gz · Last modified: 2017/09/22 13:28 (external edit)