Is there any API to send a message to a person's WhatsApp using PHP?
Well yes there is a WhatsApp api official link: https://developers.facebook.com/docs/whatsapp/overview
The WhatsApp Business API client supports a subset of features provided by WhatsApp apps that you are already familiar with from Android, iOS, the web, and other platforms, including end-to-end encryption. The difference is that this application can be deployed on a server, providing a local API that allows you to programmatically send and receive messages and integrate this workflow with your own systems (CRMs, customer service, etc.).
If you use something other than the official WhatsApp Business API or other official WhatsApp tools, we reserve the right to limit or remove your access to WhatsApp as this violates our policies. Do not use unauthorized third-party tools by WhatsApp to communicate in the app.