Composer is the most flexible way to get started with Silex. Create a directory to host your Silex application (Named ProjectRoot above), cd to that directory and run the following command to create a composer.json file:

composer require silex/silex "~2.0"

This will add some files and directories into vendor directory, under ProjectRoot.

After that, all you need to do is require the vendor/autoload.php file and create an instance of Silex\Application in your index.php file under ProjectRoot/web. After your controller definitions (routes.php), call the run method on your application: