File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ Configuration Formats
5858~~~~~~~~~~~~~~~~~~~~~
5959
6060Unlike other frameworks, Symfony doesn't impose a specific format on you to
61- configure your applications, but lets you choose between YAML, XML and PHP.
61+ configure your applications, but lets you choose between YAML, XML and PHP.
6262Throughout the Symfony documentation, all configuration examples will be
6363shown in these three formats.
6464
@@ -653,6 +653,12 @@ This example shows how you could configure the database connection using an env
653653 ]);
654654 };
655655
656+ Your env vars may also be accessed in your code thanks to PHP super
657+ globals ``$_ENV `` and ``$_SERVER ``. Both are equivalent::
658+
659+ $databaseUrl = $_ENV['DATABASE_URL']; // mysql://db_user:db_password@127.0.0.1:3306/db_name
660+ $env = $_SERVER['APP_ENV']; // prod
661+
656662.. versionadded :: 5.3
657663
658664 The ``env() `` configurator syntax was introduced in 5.3.
You can’t perform that action at this time.
0 commit comments