Simply install the version you want or use the one that came with MacOS and you can perform tasks, providing you know how to utilize it to do so. On such method is using PHP to communicate to automator as it has been around since 10.4. You could use PHP to integrate with it by scripting your commands with PHP to Automator.