I did a benchmark about env.
constants :
0.00067687034606934 ms
getenv :
0.056761026382446 ms
(less is better)
https://github.com/eftec/php-benchmarks#define--const--env
And, in Windows at leat, reading the env value is considerably slow (in comparison with a constant), so PHP doesn't cache the information and asks to the OS the env value per call.
So, if you are calling once per request, then there is not a problem. However, if you are calling it many times per request, then it could affects the performance.