Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:2052 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94697 invoked from network); 28 May 2003 08:20:52 -0000 Received: from unknown (HELO salem) (212.209.116.169) by pb1.pair.com with SMTP; 28 May 2003 08:20:52 -0000 Received: from localhost (localhost [127.0.0.1]) (uid 1000) by salem with local; Wed, 28 May 2003 10:20:56 +0200 To: Derick Rethans Cc: internals@lists.php.net In-Reply-To: References: <000601c324e8$d1798300$680fa8c0@asterix> Organization: Capio ApS Message-ID: <1054110055.20242.53.camel@salem.intra.nobolt.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=_salem-19985-1054110056-0001-2" X-Mailer: Ximian Evolution 1.2.4 Date: 28 May 2003 10:20:56 +0200 Subject: Re: [PHP-DEV] mapping c++ classes to php classes From: per@nobolt.com (Per Lundberg) --=_salem-19985-1054110056-0001-2 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2003-05-28 at 10:03, Derick Rethans wrote: > On Wed, 28 May 2003, joerg mauz wrote: > > when I write a c++ extension for php (already done so far) are there > > any mechanism provided by php to map my c++ classes to php or do I > > have to write some kind of a php to c++ class wrapper (every member > > function for the php class will call a native c function that does the > > job) my self ? > You need to write such a wrapper yourself. It would actually be very convenient to have a C++ to PHP class mapping extension, that would seamlessly integrate C++ classes into PHP, making them be callable from PHP code (and the other way around as well would also be very good). This is a bit similar to what gcj is doing; they have a special API called CNI (Cygnus Native Extensions) that makes Java classes be available to C++ classes, and the other way around. It works very well as far as I understand, but of course it is much easier to do it with Java and C++ since they share almost all the syntax and concepts, and they are both compiled environments... PHP is a different baby. :) -- Best regards, Per Lundberg / Capio ApS Phone: +46-18-4186040 Fax: +46-18-4186049 Web: http://www.nobolt.com --=_salem-19985-1054110056-0001-2 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: 7bit Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQA+1HFnTN4aRo9LnpERAnwzAKCVret9oJh5u4E/jCjd5I3bAMEoqgCgk/24 SgYDR0l5amjaxvgR6lPtyhU= =ON5w -----END PGP SIGNATURE----- --=_salem-19985-1054110056-0001-2--