On the following page: http://www.yiiframework.com/doc-2.0/guide-concept-configurations.html
What if you need more environments? For example a "stage" environment? Also would the server I develop on locally be classed as "dev" or "test" environment?
Local server is "dev". If you need additional environments and want to use same-style constants, define these in index.php.