I am currently working on a PHP project and I have a requirement where I need to retrieve all the environment variables and store them in an array. However, I am not sure about the best way to achieve this. Could someone please guide me on how to get all environment variables as an array in PHP?
Any help or suggestions would be greatly appreciated. Thank you in advance!