Is there a way to set an env var such that my LAMP stack can read in and glean whether it's in production vs. dev mode? I do not want to set an explicit line within the context of my server, within php, or explicitly in my app. Rather, I want my app to ref php, perhaps php to ref the server or it's user's env, and the server to also ref something external.
In this fashion, I can generate shell scripts such as 'goprd' or 'godev', restart the stack, and have logic defined within each tech node and adjust their behaviors accordingly. Node uses a $NODE_ENV param, which is ~equivalent of what I wish to do with my existing stack.
Perhaps I'm being short-sighted--if there is a preferred BKM I am willing to hear it. Searching around, most env_var solutions were posted within the context of some dev framework, vs the raw server components. I also failed to find a way to safely set a PHP superglobal that didn't feel hack-ish.