Extensions Conclusion

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?

Hacking with PHP has been fully updated for PHP 7, and is now available as a downloadable PDF. Get over 1200 pages of hands-on PHP learning today!

If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!

Next chapter: Summary >>

Previous chapter: Factorials in C

Jump to:


Home: Table of Contents

Copyright ©2015 Paul Hudson. Follow me: @twostraws.