Download and run Composer’s installer by running this command at a shell prompt in your terminal:
curt -sS https://getcomposer.org/installer | php
On Windows, download and run the Composer installer and then run Composer- Setup.exe.
If you’ve installed Composer successfully, when you run it from the command line (by typing php composer.phar, or just composer on Windows, you should see a help screen listing the commands that Composer supports.
Source: Sklar David (2016), Learning PHP: A Gentle Introduction to the Web’s Most Popular Language, O’Reilly Media; 1st edition.