Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82077 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61543 invoked from network); 7 Feb 2015 02:58:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2015 02:58:07 -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:35171] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/B0-55814-E3F75D45 for ; Fri, 06 Feb 2015 21:58:07 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id CA4F14B014A; Sat, 7 Feb 2015 03:54:40 +0100 (CET) Reply-To: To: "'Pierre Joye'" , "'Rasmus Lerdorf'" Cc: "'PHP internals'" , "'Guilherme Blanco'" References: <54D3EE95.2080109@lerdorf.com> In-Reply-To: Date: Sat, 7 Feb 2015 03:57:57 +0100 Message-ID: <035f01d04281$e1133090$a33991b0$@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: AQJT40Yc92vFpGpBAIsf6quZGCxAwgEFkKmDAjW4NjwBmg9jBJu2i0Jw Content-Language: fr X-Antivirus: avast! (VPS 150205-1, 05/02/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] Annotated PHP 5->7 extension diff From: francois@tekwire.net (=?utf-8?Q?Fran=C3=A7ois_Laupretre?=) > De : Pierre Joye [mailto:pierre.php@gmail.com] > What do you think about the creation of an example extension covering > almost everything one would do in an extension? >=20 > The class, methods or functions do not have to be useful but to have = simple > clear examples to display the differences with extensive comments. >=20 > Doing so has the big advantage of being self contained and anyone can > contribute easily. It is also easier for someone to actually play with = it > than with a diff. Maybe php-ext-gen can be useful here. It is a PHP extension generator I = just wrote, with the objective to avoid splitting extension source trees = to two independent branches, as differences between PHP 5 & 7 are beyond = what macros can do. The other objective is to make it easier to write a = typical 'bridge' extension without knowing much to the PHP API (without = manipulating any zval). It could be an ideal environment for an example = extension. The current version already abstracts and generates code for argument = parsing, return types, ini settings, resources, functions, constants. = The source for this is a Yaml or Json synthetic description and C code = reduced to the bare minimum. It is based on pluggable generators, the primary scope being PHP5, PHP7, = and HHVM. Currently, the only implemented generator is PHP 5, but PHP 7 = will be easy to implement (it is based on twig templates). The project is at https://github.com/flaupretre/php-ext-gen. Look in the = examples subdir, the wiki, and tell me what you think. Cheers Fran=C3=A7ois