What is Symfony and where it runs
What Symfony is
Symfony is a PHP framework: a set of reusable parts plus conventions for wiring them together. Instead of building routing, configuration, templates, and database access from zero, you start with tools that already solve those jobs.
Every request follows the same path. The browser asks for a URL, the front controller boots the framework, a route picks a controller method, and the method returns a response:
$path = "/hello"; $controller = "HelloController::hello"; $status = 200; echo $path; echo $controller; echo $status;
Symfony vs plain PHP
In plain PHP each URL often maps to a separate file, and shared logic travels through manual includes. That works for small sites, but routing, validation, and database code get copied from project to project.
Symfony turns that repetition into configuration. One front controller receives every request, attributes declare the routes, Twig renders the HTML, and Doctrine talks to the database:
$name = $_GET["name"]; if ($name === "") { $name = "guest"; } echo $name;
Where Symfony fits
The framework fits any server-side PHP project with more than a couple of pages. Typical examples are blogs, shops, booking systems, dashboards, and JSON APIs for mobile apps.
Small one-page sites may not need the full stack, and that is fine. Frameworks pay off when routes, forms, and database tables start to multiply.
Versions note
Symfony ships major versions with long support windows, and servers often run an older line for years. The ideas in this course carry over: routing, controllers, Twig, and Doctrine work the same way across recent versions.
All examples use modern attribute routes and typed PHP, so they need PHP 8.1 or newer on your machine:
if (version_compare(PHP_VERSION, "8.1.0", ">=")) { echo "Ready for modern Symfony!"; }
Next: Install Symfony
Article author: Arthur Isaev