- get object from
zval
s- 5: zend_object_store_get_object(d1 TSRMLS_CC)
- 7: from offset :
(php_object_struct *)((char*)(obj) - XtOffsetOf(php_object_struct, std))
- extra handlers in 7
handlers.offset = XtOffsetOf(php_object_struct, std)
- `handlers.free_obj = object_free_storage_function
- return
- 5:
zend_object_value (retval)
- 7:
zend_object * (&intern->std)
- 5:
- intern
- 5:
calloc(1, sizeof(php_object_struct))
- 7:
ecalloc(1, sizeof(php_object_struct) + sizeof(zval) * (class_type->default_properties_count - 1))
- 5:
- init props
- 5: always
- 7: only for new object (not for clone)
- save new intern
- 5: for clone
- 7: never (it's taken from offset)
- handlers
- 5:
retval.handlers
- 7:
intern->std.handlers
- 5:
- object store
- 5:
zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) object_free_storage_function, NULL TSRMLS_CC)
- 7: none (it's set in init)
- 5:
- return
- 5:
zend_object_value (retval)
- 7:
zend_object * (&intern->std)
- 5:
- 2nd argument
- 5: NULL (intern reference)
- 7: 1 (whether to init props)
- return
- 5:
zend_object_value (retval)
- 7:
zend_object * (&intern->std)
- 5:
- new object :
new_obj
- 5: reference arg to create_object_ex
- 7: XtOffsetOf of the create_object_ex result
- new object value :
new_ov
- 5: result of create_object_ex
- 7: none
- clone members
- 5:
zend_objects_clone_members(&new_obj->std, new_ov, &old_obj->std, Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC)
- 7:
zend_objects_clone_members(&new_obj->std, &old_obj->std TSRMLS_CC)
- 5:
- get object from
zval
s (see above)
- table pointer (second argument)
- 5:
zval ***table
- 7:
zval **table
- 5:
- modifying existing props from
zend_std_get_properties
- 5:
zval *
: useMAKE_STD_ZVAL
and then save - 7:
zval
: save as it is
- 5:
- get object from
zval
s (see above) - free object
- 5:
efree(intern)
- 7: do nothing
- 5:
- return
- 5:
zval **
: ptr of ptr to the engine zval or NULL if overloaded - 7:
zval *
: ptr to engine zval or NULL if overloaded
- 5:
- 4th parameter
- 5:
const zend_literal *key
- 7:
void **cache_slot
- 5:
- member name handling (2nd param)
- 5: convert it to string zval if needed and free it if conversion changed zval
- 7: get zend_string from zval and release the string at the end
- return
- 5:
zval **
: ptr of ptr to the engine zval or NULL if overloaded - 7:
zval *
: ptr to engine zval or NULL if overloaded
- 5:
- 4th parameter
- 5:
const zend_literal *key
- 7:
void **cache_slot
- 5:
- extra
zval *rv
last (5th) parameter in 7- the same as zend_read_property
- also when calling std handler
- member name handling (2nd param)
- 5: convert it to string zval if needed and free it if conversion changed zval
- 7: get zend_string from zval and release the string at the end
- we need to ensure in 5 that retval is temporary variable
Z_SET_REFCOUNT_P(retval, 0); Z_UNSET_ISREF_P(retval);
- all have the common issue for getting object from zval (see above)
- 7: It is possible to call
ZEND_CTOR_MAKE_NULL()
if init fails