Lecture: PHP Extension Development with C++

Wrapping a C preprocessor API in C++

Since the PHP core and the extension API are implemented in C, most
PHP extensions are written in C, too. But it is possible to write
extensions using the C API and a C++ compiler. This has the advantage
that you can use all the nice features of C++, like object
orientation, exceptions, templates and the STL. Apart from using these
features in the extension code, they can also be used to wrap parts of
the PHP extension API, to provide a cleaner interface.

I will show what such a wrapper could look like, by starting with a
regular C style PHP extension which gets extended using C++ features
and small wrappers. This results in an extension which is easier to
write.

Info

Day: 2012-08-25
Start time: 10:00
Duration: 01:00
Room: HS6
Track: PHP
Language: en

Links:

Files

Feedback

Click here to let us know how you liked this event.

Concurrent Events