note 41909 added to zend.variables
| From: | php-general at lists dot php dot net | Date: | Mon, 26 Apr 2004 02:13:08 +0000 |
| Subject: | note 41909 added to zend.variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-68804@lists.php.net to get a copy of this message | ||
If you want to free zval, you can do this:
{
zval *new_var;
/* allocate and initialize new container */
MAKE_STD_ZVAL(new_var);
/* set type and variable contents here, see the following sections */
ZVAL_STRING(new_var, "123456", 1);
/* introduce this variable by the name "new_variable_name" into the symbol table */
zend_hash_update(
EG(active_symbol_table),
"new_var",
strlen("new_var") + 1,
&new_var,
sizeof(zval *),
NULL
);
zend_hash_del(
EG(active_symbol_table),
"new_var",
strlen("new_var") + 1);
FREE_ZVAL(new_var);
}
----
Manual Page -- http://www.php.net/manual/en/zend.variables.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41909
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41909&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41909&report=yes
Search -- http://master.php.net/manage/user-notes.php