# Modify the ht of ZVAL?

- Thread: https://externals.io/message/42019
- Original archive: https://news-web.php.net/php.internals/42019
- Started by Chris Jiang on 2008-11-22T18:54:31+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #42019 — Chris Jiang — 2008-11-22T18:54:31+00:00

URL: https://externals.io/message/42019#42019

Hi all, I'm moving onto zval part of my studying now. Just wondering, 
how a zval in another zval can modified.

I've been reading the documents, and found that zval is normally 
forbidden from modifying if not passed by reference, and can be 
separated manually. Using hash* functions allows adding content to a 
zval (key=>value pair of an associated array for instance).

However, how can it be modified? Would add_assoc_* overwrite a key with 
new value? Or does hash_* functions? Or should I just create another 
empty zval and copy everything their with a filter?

Thanks!
