It really depends how the MTA is configured, and what MTA it is.
Most MTAs have a aliases file and/or database of some sort. If you can get PHP to have access to that, great.
But if you've got Ensim control panel or something on, it fucks your system up so badly, the chances are you've got absolutely no idea how anything works.
If you can't write the aliases file directly with PHP (which may be difficult due to permissions), maybe you can write another file, and have a cron job or something running as root which picks up PHP's aliases and integrates them into the normal aliases file etc.
Cheers
Mark