Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21693 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20238 invoked by uid 1010); 26 Jan 2006 23:16:41 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 20223 invoked from network); 26 Jan 2006 23:16:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jan 2006 23:16:41 -0000 X-Host-Fingerprint: 128.32.61.106 smtp-out1.Berkeley.EDU Linux 2.5 (sometimes 2.4) (4) Received: from ([128.32.61.106:44084] helo=smtp-out1.berkeley.edu) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 1C/30-03249-85859D34 for ; Thu, 26 Jan 2006 18:16:40 -0500 Received: from dhcp-139-92.ohr.berkeley.edu ([169.229.139.92] helo=peiscg33m) by calmail-fe2.berkeley.edu with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.60) (auth login:saramg@berkeley.edu) (envelope-from ) id 1F2GM0-0004uR-7N; Thu, 26 Jan 2006 15:16:36 -0800 Message-ID: <00da01c622ce$8db2f200$5c8be5a9@ohr.berkeley.edu> Reply-To: "Sara Golemon" To: "Kiput" Cc: References: Date: Thu, 26 Jan 2006 15:16:35 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Subject: Re: Need help in defining a class from C code. From: saramg@berkeley.edu ("Sara Golemon") > I'm currently working on a tiny "wrapper" > in C++ which will aid in easy embeding PHP > in C++ apps. > What functionality is it that you feel is lacking from sapi/embed? I know that C != C++, but C++ can certainly link against C libraries and using sapi/embed is pretty well dirt-simple. Or were you planning on dumbing it down to the point where the C++ developer doesn't need to know what zval* is, let alone how to interact with script code. > Could anyone (I'm sure it's 5 > minutes of work, since most of you work with > PHP/Zend frequently) write me a snippet of > code in C which would be equal to following > PHP code: > That depends very largely on whether or not you want it to be PHP4 compatable. The structure is similar enough that PHP4 classes will work in PHP5, but if you're willing to eschew PHP4 support, it'd be best to go with a clean PHP5 design.... Wait.... are you planning on giving your PHP scripts direct access to your C++ object instances? Thats.... daring... -Sara