note 41909 deleted from internals2.ze1.zendapi by cmb
| From: | cmb@php.net | Date: | Sun, 10 Jan 2021 13:26:19 +0000 |
| Subject: | note 41909 deleted from internals2.ze1.zendapi by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-216132@lists.php.net to get a copy of this message | ||
Note Submitter:
----
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);
}