PiPHP: GPIO is a PHP library that can be installed via composer that allows you to control these GPIO pins. Here is an example of how we might use the library to blink an LED a few times when a button press is detected.

A nice and simple introduction to programming a Raspberry Pi with PHP. For many developers, I would imagine Python would be their first choice for this type of thing, but it’s nice to know there are alternatives available.