src/Kernel.php
public function getSubEnvironment(): string
    {
        $result = $this->defaultSubEnvironment;

        if ($this->container && $this->container->hasParameter('app.sub_environment')) {
            $result = (string)$this->container->getParameter('app.sub_environment');
        }

        return $result;
    }
public function getSubEnvironment(): string
    {
        $result = $this->defaultSubEnvironment;

        if ($this->container && $this->container->hasParameter('app.sub_environment')) {
            $result = (string)$this->container->getParameter('app.sub_environment');
        }

        return $result;
    }
Returns sub environment name, e.g. local, test, production,...

Use for overwriting the default service configuration e.g. with console.local.yml

@return string