Christoph Rumpel has written up a tutorial showing you how to build a PHP chatbot in 10 minutes by hooking a PHP 7 based script in, via webhooks, to a Facebook Messenger application.
The chatbot topic is huge right now. Finally there is something quite new again and nobody knows what's happening next. This is the perfect time to start experimenting with chatbots and to build your own one right now. Give me 10 minutes of your time and I will give you your first chatbot!
He then walks you through the full process if setting up the Facebook Messenger application, a page to host it from and using the Chatbot boilerplate code to connect the application back to the Facebook platform. This includes both the code needed and screenshots along the way of what you can expect to see during setup. The result is a bot that can respond with, at first, a static string then is modified to show simple exchange rate data.