Workshop in English - UK at The Dutch PHP Conference 2024
Short URL: https://joind.in/talk/05e0a
(QR-Code (opens in new window))
In this workshop, you will learn how to write a PHP extension.
We will start by converting a function that we already have in PHP code into C, which we will then wrap in a PHP extension. This will show what performance benefits you can expect by converting an algorithm.
Secondly, we will then look at wrapping the data structure that the function operates on into a class, with the initial function converted to a method. And then lastly we will add multiple methods to finish up.
What You Will Learn
– How PHP’s build system works.
– How PHP handlers memory management and types.
– How to write a basic extension with procedural functions and OO.
– Where extensions would not be useful.
Required
For understanding the tutorial:
– Some knowledge of C
For taking part in the exercises:
– A Linux machine or Linux VM
– Compilers installed (apt-get install php-dev, or similar)
– GIT, valgrind, and gdb installed (all through apt, or similar)
Comments
Comments are closed.