What to do when Notices or Warnings in the PHP runtime cause a third-party library (aliyun-openapi-php-sdk) to fail?
The Function Compute PHP runtime treats PHP notices and warnings as exceptions by default. When a third-party library such as aliyun-openapi-php-sdk emits a notice or warning, the runtime throws an exception and the function invocation fails.
To resolve this, call PHP's built-in set_error_handler in your function to override the default error handler. This lets you control how notices and warnings are handled and prevents them from being escalated to exceptions that abort execution.
For a detailed explanation of PHP runtime exception handling in Function Compute, see Function ComputePHP Runtime-ExceptionHandling.