On Sat, Nov 17, 2012 at 3:05 PM, Adi Mutu <adi_mut...@yahoo.com> wrote:
> Hello, > > Got a few questions if anybody can help me out: > > 1) what's the difference between zend_object and zend_object_value? what > is each for? Because i'm confused.. > 2) What are zend_object_store_bucket; and zend_object_store used for? > > Thanks, > A. A zend_object_value is what is saved in the zval. It has an object handle (an integer uniquely identifying the object) and a structure with object handlers (which are used whenever you interact with the object). The object handle can be used to get the object data from the object_store. The object_store is basically a dynamic array of zend_object_store_buckets. The buckets contain the object data, as well as handlers for dtor/free/clone and some other stuff. The default object structure stored in the object store is a zend_object. It contains the class entry, properties and recursion guards. It is also possible to put a custom object structure into the store, but even in that case zend_object will be the first part of the structure. Nikita