~/talk

Your first PHP extension

Talkat PHP UK Conference 2023 · 2023-02-14..02-16· [php, rust]

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

  1. 0:00PHP extensions introduction
  2. 2:38Reproducible build setup
  3. 7:15Rust PHP extension project
  4. 9:44Hello World in Rust
  5. 17:25Lightning CSS capture
  6. 25:18CSS minify with Rust
  7. 26:44OOP CSS transformer
  8. 47:07Rust and PHP extensions
  9. 51:18Q&A on PHP engine
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.