Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Configuration Formats
~~~~~~~~~~~~~~~~~~~~~

Unlike other frameworks, Symfony doesn't impose a specific format on you to
configure your applications, but lets you choose between YAML, XML and PHP.
configure your applications, but lets you choose between YAML, XML and PHP.
Throughout the Symfony documentation, all configuration examples will be
shown in these three formats.

Expand Down Expand Up @@ -653,6 +653,12 @@ This example shows how you could configure the database connection using an env
]);
};

Your env vars may also be accessed in your code thanks to PHP super
globals ``$_ENV`` and ``$_SERVER``. Both are equivalent::

$databaseUrl = $_ENV['DATABASE_URL']; // mysql://db_user:db_password@127.0.0.1:3306/db_name
$env = $_SERVER['APP_ENV']; // prod

.. versionadded:: 5.3

The ``env()`` configurator syntax was introduced in 5.3.
Expand Down