Hello,
Thanks for reaching out to us. Please refer to following document and sample code for PHP and let me know if you have any question. ^^
PHP Translator code sample: https://github.com/MicrosoftTranslator/Text-Translation-API-V3-PHP
Translator documentation: https://learn.microsoft.com/en-us/azure/cognitive-services/translator/translator-info-overview
Regards,
Yutong