Return object by reference

From: Date: Sat, 16 Mar 2002 11:55:38 +0000
Subject: Return object by reference
Groups: php.dev 
Request: Send a blank email to php-dev+get-81336@lists.php.net to get a copy of this message
Hi, I have an array with object references stored in it. Now I want to write a function which returns one of those references. I'm browsing through this array with the zval_hash_*() functions until I have the correct reference in the Variable **data. But how can I return this value by reference? The only way I found to return the value at all (without a segfault) is this: *return_value=**data; zval_copy_ctor(return_value); return; But this returns a copy of the object. If I just leave out the zval_copy_ctor() call I get a segfault. What do I need to do to return a correct object-reference? BTW: Is there somewhere a good Zend API documentation on the net? I only know http://www.zend.com/apidoc/ and this documentation isn't answering all of my questions. That's why I am bothering you with all these beginner questions ;-) -- Bye, K <http://www.ailis.de/~k/> [A735 47EC D87B 1F15 C1E9 53D3 AA03 6173 A723 E391] (Finger k@ailis.de to get public key)

« previous php.dev (#81336) next »