PHP Extension Development with C++
summary
How to build PHP extensions using C++ instead of plain C by compiling against the PHP C API with a C++ compiler. It demonstrates using C++ features—classes, exceptions, templates and the STL—and small wrapper layers around the PHP extension API to produce cleaner, easier-to-write extensions, starting from a typical C-style extension and evolving it with C++ techniques.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:20Why C++ for PHP extensions
- 2:35Traditional PHP extension with C API
- 7:50Registering functions with C API
- 10:04Module entry and function table
- 14:34Handling multiple functions
- 17:14Parameter handling and type conversion
- 20:39Defining functions with C++
- 25:11Macro-based function declaration
- 35:52C++ classes for PHP values
- 37:39Resources and further learning
- 39:55Q&A








