Question on references and writing a PHP extension..

From: Date: Sat, 18 Oct 2003 16:32:30 +0000
Subject: Question on references and writing a PHP extension..
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-139@lists.php.net to get a copy of this message
Hi - I'm just getting into writing my own PHP extension and have a question I can't find the answer to. Let's say I've written an extension that has a "double_number" function which acts like the following in PHP $n = 10; double_number(&$n); // $n = 20; In my extension do I need to use a zval for my argument in order to change it's value? That seems to be the only way, but I'm not sure. If not, got a code snippet? I can't think of any built-in functions that change anything other than arrays which are handled differently. Thanks! -philip

« previous php.pecl.dev (#139) next »