Writing a PHP extension in C - part 2

Melanie Rhianna Lewis (10.Jun.2010 at 14:30)
Workshop at Dutch PHP Conference 2010 (English - UK)

Rating: 4 of 5

PHP, PECL and PEAR provides more functionality than you can shake a stick at. Sometimes though you need to add functionality that is not yet provided by the core language or any extension. For example using IO or a C library that is not yet supported, or carrying out some processor intensive computation. In these cases you need to resort to writing your own C extension.

This tutorial comprehensively covers writing PHP extensions in C. It starts with setting up a build environment. It then introduces the basics of C extension development and work through an full example. The example will explain the various PHP data types and how PHP function arguments are handled in C. The tutorial will then move on to more sophisticated areas of extension development such as writing a stream wrapper, implementing PHP classes and using external C libraries. The tutorial will also look at using C++ rather than C as the extension language. It will cover the requirement of thread safety in extensions and explain the macros provided by PHP to support this. Finally it will talk about documentation and the facilities provided by the PHP site for PECL writers such as PECL database and SVN server.

Who are you?

Claim talk

By clicking this button you are declaring that you are the speaker responsible for it and a claim request will be sent to the administrator of the event.

If the claim is approved you will be able to edit the information for this talk.

Are you sure?

 
Comments closed.

Comments

Rating: 4 of 5

10.Jun.2010 at 13:11 by Joshua Thijssen

Good workshop. Melanie started directly with a hands-on experience in compiling a simple extension. Since writing (and understanding) extensions need a certain amount of php internal knowledge, a lot of time was spend on some dry theory (not necessarily a bad thing though!) Melanie knows her stuff and a lot of background information was presented during the workshop.

Really would have liked it to have a classical creation of writing your own extension (for example: creating a string-reverse function, own stream wrapper etc).

Rating: 4 of 5

10.Jun.2010 at 13:49 by Mark van der Velden

The content became a bit harder to understand and was a bit dry at times, but considering the subject I still mark it as quite good in addition to my comment on part 1.

Rating: 4 of 5

10.Jun.2010 at 15:07 by Rowan Merewood

Same as my comment on: http://joind.in/talk/view/1523 just had to knock a star off as it did become harder to concentrate later on. Not sure if there was any way around that though, pretty intense subject.

Cloud server hosting by Combell Combell      © Joind.in 2012