Install minimum php (no apache)

To code with php, no need to install apache and other dependencies, especially as php has a builtin web server.

apt-get install php5-cli

Then use

php -S localhost:4444

and you’re done.