Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10841 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23739 invoked by uid 1010); 30 Jun 2004 00:57:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23663 invoked by uid 1007); 30 Jun 2004 00:57:22 -0000 Message-ID: <20040630005722.23662.qmail@pb1.pair.com> To: internals@lists.php.net Reply-To: "l0t3k" Date: Tue, 29 Jun 2004 20:57:26 -0400 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Posted-By: 68.154.58.154 Subject: Receiving arguments by ref... From: cshmoove@bellsouth.net ("l0t3k") i've read the Zend API docs at php.net and they seem dated, but i haven't found anything that deals with byref parameters using the new parameter parsing API. so i have a few questions ... 1. Is it sufficient to have an zend_arg_info structure declaring that a parameter is byref, and parse the value as a zval ? e.g. static ZEND_BEGIN_ARG_INFO(arginfo_test, 0) ZEND_ARG_INFO(1, name) ZEND_END_ARG_INFO(); and then in the function... PHP_FUNCTION(test) { zval *name = null; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &name) == FAILURE) { return; } zval_dtor(name); ZVAL_STRING(name, "Hello World", 1); } or do we need to use "z/" as a parameter specifier. 2. what does the "Z" (capital z) specifier to zend_parse_parameters do 3. am i stuck using the old parameter fetching API ? l0t3k