Your first PHP extension
summary
Shows how to write a PHP extension in rust end to end: sets up a reproducible dev env with the Nyx ecosystem and defense, uses Cargo with --lib flag, links the php rs / xphp crates to avoid raw engine glue, builds a HelloWorld and a real CSS minifier by calling lightning CSS from PHP, implements a PHP-visible Transformer class with constructor and config parsing, handles Rust Result errors and lifetimes, and demonstrates the extension compiling and running successfully.
AI-written summary · about
chapters (9)
- 0:00PHP extensions introduction
- 2:38Reproducible build setup
- 7:15Rust PHP extension project
- 9:44Hello World in Rust
- 17:25Lightning CSS capture
- 25:18CSS minify with Rust
- 26:44OOP CSS transformer
- 47:07Rust and PHP extensions
- 51:18Q&A on PHP engine








