Question on references and writing a PHP extension..
| From: | Philip Hallstrom | Date: | Sat, 18 Oct 2003 02:04:59 +0000 |
| Subject: | Question on references and writing a PHP extension.. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-166581@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?
Thanks!
-philip