Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80382 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23318 invoked from network); 11 Jan 2015 21:42:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2015 21:42:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=francois@tekwire.net; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=francois@tekwire.net; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain tekwire.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@tekwire.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:15767] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/A2-05184-85EE2B45 for ; Sun, 11 Jan 2015 16:42:48 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id 3F81A4B0188; Sun, 11 Jan 2015 22:40:36 +0100 (CET) Reply-To: To: "'Pierre Joye'" , "'Sara Golemon'" Cc: "'Stanislav Malyshev'" , "'PHP internals'" References: <54B1AA31.6050703@gmail.com> In-Reply-To: Date: Sun, 11 Jan 2015 22:42:38 +0100 Message-ID: <003d01d02de7$85460c00$8fd22400$@tekwire.net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHdpO6kBDBjSAQ05ND+I0bfKmNeFQIeJCUTAflXB0ABzhWVuwG23BUcAbESKoecVhZ9kA== Content-Language: fr X-Antivirus: avast! (VPS 150111-1, 11/01/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] One API to rule them all? (Was: Extension Prepend Files) From: francois@tekwire.net (=?UTF-8?Q?Fran=C3=A7ois_Laupretre?=) > De : Pierre Joye [mailto:pierre.php@gmail.com] > > I have a working proof of concept using something like: >=20 > function u_foo() { > } > ?> > ---- native > void foo() > { > printf("Hello from native!"); > } > ?> > ... some other codes. > ?> In your example, I don't see how you execute the foo() C function from = PHP. Would it be possible to embed C code in a PHP function or method ? If yes, how do both codes access each other's data ? If foo() takes = arguments, how would they be transmitted from PHP ? What about scalar = type conversions to fit the expected C argument types ? The same about = return value. To summarize, I'd like to know how PHP and C code can communicate = together. Regards Fran=C3=A7ois