What is the difference between Registry pattern and $_ENV, especially for using in php?
Which of them provide more security and performance?
For example why many coders use $config[‘deflang’] and Registry pattern instead of just $_ENV[‘deflang’]
Thanks in advance
$_ENVhas a very specific purpose — it’s the process environment. You’re not really supposed to throw random data into it. If you want to do that, at least use a global (or, better, a static class member).