Re: OT - C programming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For a nice introduction to extension writing, read this
article:

  Part I: Introduction to PHP and Zend
  http://zend.com/php/internals/extension-writing1.php

As well as the various README files found within the php
source files:

  http://cvs.php.net/php-src/

And let's not forget about PECL_Gen. Although it requires
PHP 5 to run, it also allows one to quickly create
extensions that work in both PHP 4/5. There is also ext_skel
but it's slowly being replaced by PECL_Gen:

  http://pecl.php.net/package/PECL_Gen

And of course the Zend API docs:

  http://php.net/manual/en/zend.php

The Zend article above will be a five part series, which is 
pretty cool :)

Regards,
Philip

On Tue, 15 Mar 2005, Brian wrote:

> To understand the *'s just google for c pointer tutorial, you're
> likely to find alot of helpful material.
> 
> 
> On Tue, 15 Mar 2005 11:37:26 -0500, Jason Barnett
> <jason.barnett@xxxxxxxxxxxxx> wrote:
> > Rasmus Lerdorf wrote:
> > > Jason Barnett wrote:
> > >
> > >> Jay Blanchard wrote:
> > ...
> > > In the end you are probably much better off learning a bit of C or C++
> > > and writing your own PHP extensions than hoping that someone will make a
> > > compiler that will magically speed everything up.  PHP was designed
> > > specifically with this in mind.  The idea is to keep things that don't
> > ...
> > > better performance than any "PHP Compiler" ever will.  And it really
> > > isn't that hard to write a PHP extension.
> > >
> > > -Rasmus
> > 
> > I actually looked into building my own extension before.  I saw some of
> > the docs from the talks.php.net site and most of it made sense to me.
> > So I agree that the PHP <-> extensions interface is simple enough for a
> > poor slob like myself to understand.
> > 
> > Can you (or anyone else for that matter) give me a book recommendation
> > that explains C coding to someone with intermediate PHP skills?
> > 
> > I already have George Schlossnagle's book and it's great (it taught me a
> > lot of what I know about the source), but it assumes a level of
> > proficiency in C that I just don't have.
> > 
> > I know that you have to allocate memory for variables, you have strict
> > types (although I'm vaguely familiar with a zval), but some things like
> > all of those **'s I see in the source code just don't make sense to me.
> >   Recommendations, anyone?
> > 
> > --
> > Teach a man to fish...
> > 
> > NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
> > STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
> > STFM | http://php.net/manual/en/index.php
> > STFW | http://www.google.com/search?q=php
> > LAZY |
> > http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
> > 
> > 
> >
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux