Workshop in English - US at Longhorn PHP 2025
Track Name:
Hill Country C
Short URL: https://joind.in/talk/06e2a
(QR-Code (opens in new window))
Someone on the internet asked: "Hey #php folks: is it possible to hook into the include, include_once, require and require_once calls, like with a C extension or something?" Not only that "yes, it is possible", but also we can write this in Rust! Let's deep dive into the PHP engine internals and build a PHP extension that helps surfacing includes and measure other performance numbers of our PHP application in production. Following one of the best pieces of advice: measure, don't guess! You'll learn what an extension is, the lifecycle of PHP and how to build a basic extension to observe certain PHP behaviour. Bring some understanding of Rust or C and your laptop with either Linux or a Linux VM (Docker is fine, native MacOS should also work) to follow and take part in the exercise.
Comments
Please login to leave a comment
Very knowledgeable and the end product was a very useful demo for the tools discussed in the presentation. I took away exactly what I was looking for from this workshop.
I think having some prepared branches ahead of time with the different examples that you highlighted during the presentation would allow attendees to follow along with the code while also having that next step available to them if something went awry while they tried to follow along.