Install Apache in ubuntu
Install multiple php
Execute all installed version as parallel
Change php version in terminal
New document create menu in ubuntu while right click
Visit below link to get commands and steps
http://coderrsgateway.com/
All the best.