[Q] references and objects

From: Date: Tue, 02 Aug 2011 20:05:38 +0000
Subject: [Q] references and objects
Groups: php.internals 
Request: Send a blank email to internals+get-54295@lists.php.net to get a copy of this message
I have a zval *obj holding an object of class B, which I then add to an array member of another object of class A. Then I create a new instance *obj2 of class B, to which I want to add a reference to *obj. How would I best go about it? So A works as a "pool" of B's, and B's may reference to each other. Please tell me key functions and macros to use to accomplish specifically this thing, as the API is quite new to me. I have thought about setting Z_SET_ISREF_P() manually, but what else would I need? From my understanding, I'd still need a new zval* for that. Any other better ways? Regards, Flavius

« previous php.internals (#54295) next »