Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12310 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52746 invoked by uid 1010); 23 Aug 2004 17:50:24 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 52696 invoked from network); 23 Aug 2004 17:50:24 -0000 Received: from unknown (HELO gibraltar.zend.office) (80.74.107.235) by pb1.pair.com with SMTP; 23 Aug 2004 17:50:24 -0000 Received: (qmail 5757 invoked by uid 500); 23 Aug 2004 17:56:08 -0000 Date: Mon, 23 Aug 2004 20:56:08 +0300 To: internals@lists.php.net Message-ID: <20040823175608.GB5466@zend.com> Mail-Followup-To: internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Organization: Zend Technologies Subject: Passing structure to PHP function From: michael@zend.com (Michael Spector) Hi, I'm "translating" some function, that recieves a pointer to structure of this type: struct { char * text; char ** value; int flags; }; and I'm get stuck here, thinking of a legal way how to pass the list of structures to my PHP function. I thought to pass it in this way: myfunc ( array( array("text" => $text1, "value" => &$value1, "flags" => flags1), array("text" => $text2, "value" => &$value2, "flags" => flags2), ... ) ); but, I wonder whether this way is acceptable? Anyway, is there another solution to this problem? Thanks. -- Best regards, Michael