title: keep const value in Symfony
body: <p>Here is the problem:</p>
  
  <p>I have been trying to keep the value of a const variable if is defined in app.php in Symfony. This is my code.</p>
  
  <p>The design of the app was made it like this. with a constant that indicates what type of system to start.
  This is my code.</p>
  
  <pre><code>if(!defined("ENTORNO")) {
  define("ENTORNO",2,true);
  } 
  </code></pre>
  
  <p>i'm using "true" to redefine the const value. I have a REST service to redefine the const variable. Like this.</p>
  
  <pre><code>     * @Rest\Get("/api/VersionSistema/{id}", name="VersionSistemas")
   */
  public function VersionSistemas($id)
  {
      try {
          define("ENTORNO",$id);
          return new View(Response::HTTP_OK);
      } catch (Exception $e) {
          return new View($e-&gt;getMessage(), Response::HTTP_BAD_REQUEST);
      }
  }
  </code></pre>
  
  <p>My problem is that in each request the variable loses its value and is reinitialized. So ¿how could I always keep the value with which I redefined the variable?</p>