9951 explained code solutions for 126 technologies


php-symfony-consoleHow to get PHP Symfony version in console?


To get the version of PHP Symfony in the console, you can use the following command:

$ php bin/console --version

This will output the version of Symfony, for example:

Symfony 4.4.2 (env: dev, debug: true)

The command consists of the following parts:

  • php: the PHP executable
  • bin/console: the Symfony console executable
  • --version: the argument to get the version

For more information, please refer to the Symfony documentation.

Edit this code on GitHub