In this presentation, we take a first look at writing PHP extensions. Using step-by-step examples, we'll take a function written in PHP and convert them into a loadable extension using C. We'll then test both versions and compare the results. After seeing the size and scope of the benefits that can be realized with only a few minor changes, you'll want to try it out for yourself. You'll also understand why we start with simple things, and not try to rewrite all of Symfony or Laravel in C.

You will learn:

- What PHP extensions are, and which different types there are.
- Why you might want to write a PHP extension.
- How you write your first PHP extension, with practical tips and tricks.

Comments

Please login to leave a comment

Loved the walk through, demonstration, reasoning and explanation of how to build PHP extensions. I would like a longer workshop on this topic to get more hands on with it.

Joseph Lavin at 14:09 on 21 May 2025

Enjoyed the talk and found the content valuable. I think it would have even greater impact with a simple, real-world demo—something functional yet approachable, like implementing a basic toUpperCase function.