In a professional setting, you’ll need at least 3 environments, a development environment, a testing environment, and the live environment (when the product gets released).
The development environment is the environment in which code gets developed. It is the scratch pad, drawing board, sandbox, and etc. The development environment is the birth place and weeding environment of good and bad code. You’ll want to have this environment to weed and destroy all the bad code before you release it into the testing environment.
The testing environment is an environment that isn’t live, it is isolated from live, but as close to being live as you can get. This is the environment where you take the code generated from the dev environment and test it one last time to ensure that the code is behaving properly before you release it out into the live environment.
The live environment is where the final product is released. Hopefully, if the code made it this far, it would be bug free.
Having at least these environment ensures that the code is somewhat thoroughly tested before being released into the live environment. Obviously, the less you test the code, the harder it is to ensure that it won’t break anything or behave in an unintentional manner. Thus, one of the worst environments to have is one where the development, testing, and live environment are the same thing. Remember, the more layers we have the more bug screening the code will go through before it goes it is shown to the public. That’s why having at least a development, a testing, and a live environment is the least a professional development environment should have.