Imagine Easy is an educational technology and media company. We envision a world where education is at the core of our living and working environments. Learn more about us at http://www.imagineeasy.com
The code I used for demos is available on github and can serve as a kind of starting point for PHP extensions.
Other than that, the main thing to know is to not bother with the official documentation on php.net - it’s incomplete and outdated in parts - and to go straight to blog posts and other resources on the net. Google is your friend here.
Another good resource are the extensions that ship with php. They are of varying quality but most can serve as decent examples for how to get your own extension off the ground.