Use PHP for shell script

For #178