converting app to php, only shell https://medium.com/kr-projects/d32c46e9e4a5