November 4, 2015 5:14 pm

Top 12 Best PHP RESTful Micro Frameworks

6. Silex  [?]

To surprise, this micro framework of PHP helps to build a single tool application. Symfony2 and Pimple make the giant base for building this tool along with the inspiration of Sinatra.

Appealing Qualities:

Automated functional tests ensure that the codes created are working correctly and it saves a lot of time which is required to go through a number of pages to check whether the coding is working correctly and it has the availability of extensions to reach third party libraries by using Pimple micro service extension system.

  • Easy way of testing the application and the framework by using the Symfony2 HTTP kernel to abstract request and response.
  • Strictly follows the HTTP conditions of Symfony2 and promotes its proper use.
  • Spontaneous and to the point API is pictured.

Nutshell Routing:

  • The controllers are created and routed in a single step. Autoloader is the one required to access the framework.
  • The route is matched by the route pattern which defines the lane to reach the point of resource location and by following HTTP method which describes the communication with the resource.

For global configuration where the controller settings are applied to all controllers like a middleware, a requirement, a converter or a default it can be achieved by configuring it to app controller which holds all application controllers.

7. Slim  [?]

One of the micro frameworks of PHP is Slim with which web application can be created by doing simple and quick coding. It is also apt for the creation of APIs and for rapid prototypes. The core aspect of this micro framework is to receive the HTTP request and invokes a suitable call back routine and dispatches it to the HTTP response.

Significant Ingredients:

The important ingredients of slim are requesting and response which are immutable value objects.

PSR 7:

Slim supports PSR 7 interface with its value objects, which makes it flexible for using any of PSR 7 implementation. The interface is done in the following methods:

  • Methods for the transformation of the request and response objects with protocol version, header and body
  • Methods for the transformation of the requests are with method, Uri, Cookie Params, Query Params, Uploaded files, Parsed Body and Attribute.
  • Methods for transformation of Response object are Statues.


The app needs to be safeguarded from cross site forgery and the request need to be authenticated which is carried out by middleware. The middleware surrounds the core application in layers. The request and response from PSR 7 transverse from outer layer and reaches the core slim application. The resultant HTTP response route is dispatched from the slim and returned to the client.

8. Tonic  [?]

Tonic is one of the micro frameworks of PHP for RESTful design of the web.

Development Sketch:

The specialty is that it uses the whole useable resources with the help of the ULR which locates the resources for the HTTP request that in turn is accessed by resource method. The class method applies all the logic and return the response object. Finally, the response object is converted into standard HTML or XML page and sent back to the client.


  • The ULR is attached to the resources @URI comments. Multiple resources will be available as matching and the best fit resource from the numerous available resources is filtered by @priority comment. By adding namespace name in ULR –Space more transferable resource will be built.
  • The HTTP request is accessed as a request object with the resource method in which the request contents and data are exposed via public property as a request header.
  • To avoid performance penalty of syntactic analysis of resource comments, Tonic has two cache classes, one to store cache on disk and the other uses APC data store.

Another class can be routed by adding condition to methods by customization comments and only if all the conditions are agreed devoid of any Tonic exception the resources will be returned. The exceptions if any can also be handled in the dispatcher.

Pages: 1 2 3 4

Author Huzoor Bux

I am Huzoor Bux from Karachi (Pakistan). I have been working as a PHP Developer from last 5+ years, and its my passion to learn new things and implement them as a practice. Basically I am a PHP developer but now days exploring more in HTML5, CSS and jQuery libraries.

Tutorial Categories:

Leave a Reply

Your email address will not be published. Required fields are marked *