You can define environment variables in a couple of ways as described in the serverless Functions documentation here:
Once you’ve defined your environment variables, you can follow the steps here on how to get the value of an environment variable in your PHP serverless Functions.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.