Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72563 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37034 invoked from network); 13 Feb 2014 20:45:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2014 20:45:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.176 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.214.176 mail-ob0-f176.google.com Received: from [209.85.214.176] ([209.85.214.176:52449] helo=mail-ob0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/BA-09050-1FE2DF25 for ; Thu, 13 Feb 2014 15:45:37 -0500 Received: by mail-ob0-f176.google.com with SMTP id gq1so12840509obb.35 for ; Thu, 13 Feb 2014 12:45:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3yVlXqmMVkO1xnynxtu0PzMvQN3fSgfDPghdygnA7HM=; b=kZxv9f9XXQpqz51PdOOAM+VF2jeOfU40bkaV+dxqf/YTjbiz6CPNVpKD3AKW+lq50X 95wFp7PpJaNoIjI5cyIUuvm3kbMu7B0rFZT3O/QA48AqkoJ1Ci61/Hfq0BN+mhhSx24p uhASxeF/YJvoK8xpC0IzeDEEJBHM6o0eLWxaea5vRnX+aC11K1elLSt33zlcnnmTc6b4 1eZEkln4dEMa/PwF6uZfN44CRcEkawcTPuiPO/uyoDrb45mBlHsu/biW0Sh6E3T36rY5 KFZJk69RC/aLU1c3m0BloVZl65V4wcpSRxguf+1mYxYP209DRkXbLh5w7lq3EZowBtMY mmsQ== MIME-Version: 1.0 X-Received: by 10.182.230.135 with SMTP id sy7mr2983606obc.24.1392324333813; Thu, 13 Feb 2014 12:45:33 -0800 (PST) Received: by 10.182.54.112 with HTTP; Thu, 13 Feb 2014 12:45:33 -0800 (PST) In-Reply-To: References: Date: Thu, 13 Feb 2014 21:45:33 +0100 Message-ID: To: Kevin Ingwersen Cc: internals Content-Type: multipart/alternative; boundary=001a11c3367654495304f24fc54c Subject: Re: [PHP-DEV] When will the extension and embedding APIs ever be cleaned or documented? From: nikita.ppv@gmail.com (Nikita Popov) --001a11c3367654495304f24fc54c Content-Type: text/plain; charset=ISO-8859-1 On Thu, Feb 13, 2014 at 9:22 PM, Kevin Ingwersen wrote: > Hey. > > Just a while ago, i started writing a C++ library, that I would like to > utilize in PHP. Since the original aproach was made in C++, I would like to > keep the OOP syntax in PHP. > > Already, months ago, I had tried to find ways to write useful PHP modules. > But the major problem was always: How. I easily found documentation about > adding functions...and how to expose a void pointer in the form of a > "Resource". But that was all that was ever properly documented. The OO > module api was never really documented, and yet, is still hard to figure > out. I was sent a slideshow of the api...but is a set of slides a really well > made documentation? I think not. > > Many of you internals probably know the APIs needed to do these things: > > - Create a class with public/private/protected methods - thus > making a class final. > - Being able to store a pointer to forgein objects into the class, > to re-use it. > I think we have a pretty good coverage of object and class APIs here: http://www.phpinternalsbook.com :) > I have been learning to use the v8 API a lot and it has a very clean > syntax. A third-party scripting language brought it even so far, that it > could almost map native types to script types - but that was pure C++ - > both of them. > V8 has the benefit of being written in C++ and being a lot newer. HHVM has really nice extension APIs, all courtesy to C++. But a number of core devs are rather opposed to using a more powerful language as the basis for PHP ;) *Glares at Pierre* Nikita --001a11c3367654495304f24fc54c--