On the MakeUseOf site there's a recent post showing how you can create the "perfect PHP development environment" on your Android-based device. Obviously, it's much more useful on a tablet, but in theory it could be used on a smartphone.
It turns out you can actually code on Android productively. For the longest time, it has been accepted that whilst computers are for productivity and creativity, Tablets exist purely to allow the passive consumption of content. I believed that as well. I’m a software developer by trade, and I use a 13" Macbook Pro to write all my code. I wouldn’t have it any other way. OS X comes with everything I need to be productive as a developer, and I’ve built my workflow around that. Android on the other hand? I’ve never really thought about writing code on Android. [...] But then I bought a decent Bluetooth keyboard, and everything changed. I’ve now built a PHP development environment around my 2012 Nexus 7 tablet, and I love it.
He breaks it down and shows some of the tools he uses for his development including the use of VIM Touch for editing and the Palapa Web Server for local hosting of his applications. Screenshots of the setup and configuration are also included.