The run php for AppEngine requires cgi-version of php 5.4 (and above) and python 2.7 (and above).

Installing Python:

sudo apt-get install python
Install php5:

sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
Installing php5-cgi:

sudo apt-get install php5-cgi
Grabbing the AppEngine for PHP SDK:

wget http://commondatastorage.googleapis.com/appengine-php/appengine-php-sdk-1.8.0.zip

unzip appengine-php-sdk-1.8.0.zip
Starting a local AppEngine instance using php5-cgi:

./dev_appserver.py /path/to/your/app –php_executable_path=/usr/bin/php5-cgi

Your app should now be serving on:  http://localhost:8080/.

Details can be found in google official documentation: https://developers.google.com/appengine/docs/php/gettingstarted