This has long been a brief excursion into the world of writing PHP extensions, but I hope I've shown you that really it's not such a hard thing to do. Sure, the macros take a bit of learning, but helper functions like zend_parse_parameters() can really lower the learning curve.
The best way to learn how to use the PHP extensions system is just to pick a problem you want to solve and dive right in. So, what are the bottlenecks in your code? Would it work if it were moved to C? Have fun!
Want to learn PHP 7?
Next chapter: Summary >>
Previous chapter: Factorials in C
Home: Table of Contents
Copyright ©2015 Paul Hudson. Follow me: @twostraws.