Try this:
/*** array your_ext_func() ***/
ZEND_FUNCTION(your_ext_func)
{
zval *val_ret, *val_str;
char *output;
int ret;
output = (char *)emalloc( 100 );
some code to set output and ret
array_init(return_value);
MAKE_STD_ZVAL(val_ret);
MAKE_STD_ZVAL(val_str);
ZVAL_LONG(val_ret, ret );
ZVAL_STRING(val_str, output, 0);
/*** return_value is an array, [0] is value ret, [1] is
string output ***/
zend_hash_next_index_insert( HASH_OF(return_value), val_ret,
sizeof(zval *), NULL );
zend_hash_next_index_insert( HASH_OF(return_value), val_str,
sizeof(zval *), NULL );
}
In your php file do this:
list($ret,$str) = your_ext_func();
Just a simple example, edit as needed.
Brian
At 6:21 PM +0200 9/24/02, Ole Stakemann wrote:
How do I do that in an extension? I want to adhere to the
recommendation that allow_call_time_pass_reference should be off.
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php