I work with two application servers on a daily basis: one development, one production. A variety of apps from different developers live on these boxes, as well as some scrip
Just set an environment variable. It works on Windows and linux, they are even called the same thing now. Then just check $_ENV["DEVVSPROD"]
$_ENV["DEVVSPROD"]