Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42019 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53561 invoked from network); 22 Nov 2008 18:54:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Nov 2008 18:54:43 -0000 X-Host-Fingerprint: 61.50.134.238 unknown Received: from [61.50.134.238] ([61.50.134.238:19729] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/F9-32529-27558294 for ; Sat, 22 Nov 2008 13:54:43 -0500 Message-ID: <39.F9.32529.27558294@pb1.pair.com> To: internals@lists.php.net Date: Sun, 23 Nov 2008 02:54:31 +0800 User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 61.50.134.238 Subject: Modify the ht of ZVAL? From: jiangcat@gmail.com (Chris Jiang) 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!