@@ -55,7 +55,7 @@ Here are all the object handlers with their signature and a small description.
55
55
disallow manual construction by throwing an error in the handler.
56
56
57
57
.. c :member ::
58
- int count_elements(zend_object *object, zend_long *count)
58
+ zend_result count_elements(zend_object *object, zend_long *count)
59
59
60
60
This is just the internal way of implementing the ``Countable::count `` method. The function returns a
61
61
``zend_result `` and assigns the value to the ``zend_long *count `` pointer.
@@ -71,14 +71,14 @@ Here are all the object handlers with their signature and a small description.
71
71
the values are uncomparable ``ZEND_UNCOMPARABLE `` should be returned.
72
72
73
73
.. c :member ::
74
- int cast_object(zend_object *readobj, zval *writeobj, int type)
74
+ zend_result cast_object(zend_object *readobj, zval *writeobj, int type)
75
75
76
76
Internal classes have the ability to implement a custom compare behavior and override casting behavior for all
77
77
types. Userland classes on the other hand only have the ability to override object to string casting through
78
78
``__toString ``.
79
79
80
80
.. c :member ::
81
- int get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, bool check_only)
81
+ zend_result get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, bool check_only)
82
82
83
83
This handler is invoked when the object is used as a function, i.e. it is the internal version of ``__invoke ``.
84
84
The name derives from the fact that its main use is for the implementation of closures (the ``Closure `` class).
@@ -122,7 +122,7 @@ Here are all the object handlers with their signature and a small description.
122
122
longer active, in which case execution of user code may be skipped.
123
123
124
124
.. c :member ::
125
- int do_operation(zend_uchar opcode, zval *result, zval *op1, zval *op2)
125
+ zend_result do_operation(zend_uchar opcode, zval *result, zval *op1, zval *op2)
126
126
127
127
``do_operation `` is an optional handler that will be invoked for various arithmetic and binary operations on
128
128
instances of the given class. This allows for operator overloading semantics to be implemented for custom classes.
0 commit comments