Modifying PHP variables in C

From: Date: Tue, 04 Mar 2003 16:17:01 +0000
Subject: Modifying PHP variables in C
Groups: php.dev 
Request: Send a blank email to php-dev+get-94764@lists.php.net to get a copy of this message
Hi, I'm porting some PHP code to C, and was hoping that someone can help me. I have 2 variables $oldarray and $newarray that both hold arrays and want to set $oldarray = $newarray; I suppose i have to dispose of $oldarray before i set it to $newarray. I'm not sure what is the best way, so i did this. zval **oldarray,*newarray; zval_add_ref(&newarray); convert_to_null_ex(oldarray); *oldarray = newarray; Would this work? Secondly is there a better way. Thanks again. John Lim

« previous php.dev (#94764) next »