Implement 'main' of PHP script