When comparing Li3 vs Silex, the Slant community recommends Li3 for most people. In the question“What are the best PHP frameworks?” Li3 is ranked 10th while Silex is ranked 14th. The most important reason people chose Li3 is:
Lithium has unified the relational and non-relational database APIs into a single one. Being one of the few frameworks to do it.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Unified relational and non-relational database API
Lithium has unified the relational and non-relational database APIs into a single one. Being one of the few frameworks to do it.
Pro Robust plugin architecture
Lithium makes use of PHP namespaces to create a powerful plugin architecture. Almost every component of the framework is replaceable.
Pro Fast Bootstrap & Autoloader
This framework loads faster than most due to its class autoloader. It is flexible as well and handles older classes - but requires the developer to define transforms here for naming convention, includes, etc. Many other frameworks use Composer for autoloading and that significantly slows down their bootstrap time because Composer's autoloader is extremely compatible without much developer interaction (it does not require as much involvement for autoloading legacy libraries). So it's a trade-off, speed vs. a little bit of up-front work.
Pro Integrated unit testing
Lithium comes with integrated unit testing. It also has a test dashboard.
Pro Aspect inspired filter system
Lithium's filter system is based on the paradigm of Aspect-oriented programming which aims to increase modularity by separating cross-cutting concerns and helping speed up development.
Pro Great for building an API
Lithium can return JSON and many other formats from the same actions that render templates increasing productivity in many cases. It handles a "type" key in the route which allows it to render various responses with different Content-Types. This is incredibly useful and easy to extend. This combined with closures in routes makes Lithium a very good framework for building a RESTful API.
Pro Built on top of Symfony components
The thing that makes Silex stand out from other PHP microframeworks is the fact that it's built using some of Symfony2's components. Making it quite powerful but still lightweight enough to be considered a true microframework.
Pro Open source
Silex is open source and is licensed under the MIT license.
Pro Simple and elegant DI container
Based on Pimple, Silex has a simple Dependency Injection container that consists of just one file and one class.
Pro Testable
Silex makes use of Symfony2's HttpKernel which is used to abstract requests and responses. This in turn, makes it very easy to test apps created with the framework.
Pro Extensible
By using Pimple, the Silex application extends the Pimple class, which in turn is nothing more than an implementation of the ArrayAccess interface that has been a part of PHP since version 5.0.
This makes it possible to use an instance of the Application class as if it were an array. Like so:
$app = new Silex\Application();
$app['config'] = new Config($config_path);
This gives developers a great deal of flexibility when injecting dependencies and when testing.
Cons
Con Less than ideal documentation
Documentation is scattered so it takes a little while to learn and figure some things out.
Con Documentation is not very extensive
The documentation for this framework is average, it's helpful mostly. But it is not extensive enough to cover everything in detail unfortunately.