What are the limitations of using MySQL triggers in relation to calling external PHP scripts?

When using MySQL triggers, there is a limitation in directly calling external PHP scripts. One way to work around this limitation is to use a user-defined function within the trigger to make an HTTP request to a PHP script. This function can be used to trigger the external PHP script based on the conditions specified in the trigger.

DELIMITER //

CREATE FUNCTION call_external_script()
RETURNS INT
DETERMINISTIC
BEGIN
    DECLARE result INT;
    
    SET result = (SELECT HTTPGET('http://example.com/external_script.php'));
    
    RETURN result;
END//

CREATE TRIGGER trigger_name
AFTER INSERT ON table_name
FOR EACH ROW
BEGIN
    CALL call_external_script();
END//

DELIMITER ;