By Gajotres -
Last updated on August 14th, 2015
Before I can start talking about PHP RESTful micro frameworks, let me first say that I am first and foremost Java developer. At the same time, my personal and official job also requires of me to work with PHP, from time to time. It was never my intention to write an article about this topic. A purpose of this blog is to help mobile developers working with JavaScript; PHP was never part of it. But as things go I made a decision to write a rather complex set of jQuery Mobile tutorials that required server side communication. My first thought was to use Java Play Framework. This plan backfired when I found out that a lot of my readers were PHP developers. Everything mentioned before urged me to switch to PHP but at the same time I was required to spend some time searching for the best replacement for the Play Framework. This article should showcase this search. I will try to be as much objective as I can. Before I chose these frameworks, I spent a lot of time playing with everything available attempting to find a perfect one. Don’t get me wrong, this doesn’t mean other frameworks are wrong or inadequate, as you will see, my decision was hard, and it took time.
Note: If this tutorial was helpful, need further clarification, something is not working or do you have a request for another Ionic post? Furthermore, if you don't like something about this blog, if something is bugging you, don't like how I'm doing stuff here, again leave me a comment below. I'm here to help you, I expect the same from you. Feel free to comment below, subscribe to my blog, mail me to dragan.gaic@gmail.com, or follow and mention me on twitter (@gajotres). Thanks and have a nice day!

PS. If you want my help, if possible (even if it takes you some time to do that), create a working example I can play with. Use Plunker for AngularJS based questions or jsFiddle for jQuery/jQuery Mobile based questions.

Table of Contents

Recomendations

A lot of my readers asked me this question, and I’m sick of repeating it over and over again (smiley face). I will recommend these four frameworks:
  1. Silex
  2. Slim
  3. Lumen
  4. Phalcon
If you require an explanation, scroll down and read my reviews.

Intro

Before I start take a look at a list of my chosen ten, in alphabetical order:

1. BulletPHP

Introduction date: 2012
The Bullet is a rather newer addition to PHP micro-framework community with a unique approach to URL routing. It helps you quickly create REST APIs and web applications that automatically conform to the requirements of the HTTP specification. Unlike most of it brethren Bullet is a resource and URI-oriented and comes pre-loaded with powerful HTTP features like content-negotiation and caching. Fundamentally that means instead of defining a full path pattern or a typical URL route with a callback and parameters mapped to a REST method (GET, POST, etc.). The Bullet can parse only ONE URL segment at a time, and only has two methods for working with paths: path and param.

Links

Official Site Documentation Installation, Working Example

Pro

  • Its unique design prevents a lot of code duplication. Nested closures are crucial to how Bullet works; they work similarly to jQuery callback functions. Look at an example below to see a difference.
  • Since URL routes are handled on segment per segment basis; code provides high re-usability, which is unique in current micro frameworks world.
  • URL routes handle only a single path segment
  • URL routes can be crafted without restrictions, giving you an ability to nest them as deep as you want.
  • Caching of table metadata

Con

  • Documentation is lacking enough information to get you started (I advise you to take a look at the above link Tutorial, Installation, Working Example). It lacks a better organization. Currently, it is not beginner friendly; it took me some time to make it work.
  • New routing model, while excellent, still doesn’t feel that much flexible. This approach still suffers from code bloatedness and code mixing.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$app->path('posts', function($request) use($app) {
// Get posts collection
$app->get(function($request, $postId) use($app) {
return "GET /posts";
});
$app->param('int', function($request, $postId) use($app) {
// Get single post resource
$app->get(function($request) use($app, $postId) {
return "GET /posts/" . $postId;
});
// Update single post resource
$app->post(function($request) use($app, $postId) {
return "POST /posts/" . $postId;
});
});
});

Author Notes

This framework is a good starting choice, mainly for smaller projects. New routing model makes it very versatile. On the other hand, because of its age and simplicity, you will need to mix it with other frameworks. Mostly because, unlike some older frameworks (like Fat-free framework), Bullet don’t have additional functionalities (ORM for example).

2. Fat-Free Framework

Links

Official Site Documentation Installation, Working Example

Pro

  • Lightweight and multifunctional, built like Swiss army knife.
  • Everything is modular.
  • Fast so it should be considered for larger projects.
  • Excellent API and how-to documentation, not the best one but way better than usually expected. Everything is tutorial based, making it easy to follow and implement.

Con

  • Suffers from code repetition, just like some other similar frameworks.
  • It’s overkill if you are not going to use most of it functionalities
  • ORM module is easy to implement/configure, but there’s a lot of room for improvements. Of course, you can always use another one.

Example

1
2
3
4
5
6
7
class WebPage {
function display() {
echo 'I cannot object to an object';
}
}
$f3->route('GET /about','WebPage->display');

Author Notes

The Fat-free framework is an excellent piece of software. While there’s nothing innovative about it, you will be surprised how much functionality is provided for you. Not to mention it runs smooth and fast. It is half way between micro frameworks and larger frameworks like Zend or Symphony, more so I find it to be an excellent replacement for mentioned more major frameworks, not to mention, it’s heavily modular. It gets a job done.
Continue Reading
Page 2
GitHub GitHub Documentation

Pro

  • This framework used to be a great and in some way it still is. Unfortunately, younger competition overshadowed it some time ago
  • Still slimmer then Slim framework, you can do so much with so little code

Con

  • Bad documentation. I so worse but this one is barely manageable.
  • What you see is what you have, you should forget modulability
  • It gets less and less useful as time goes by

Author Notes

Few years ago I would advise using this framework, unfortunately not anymore. While it is a micro-framework, it is missing some features. It is simply past its glory.

4. Lumen

The Lumen is a stunningly rapid micro RESTfull framework mad by Laravel. Compared to other frameworks on this list, Lumen is a brand new framework made by Taylor Otwell, designed for ultra fast micro-services and API’s. Official WebSite GitHub GitHub Documentation

Pro

  • First and foremost, excellent documentation
  • Man it’s fast, but ….
  • Excellent 3rd party support thanks to the bigger brother (Laravel)
  • Easily upgradable to the full Laravel project
  • Easily understandable syntax, to this date this was a fastest “from scratch" setup

Con

  • …. still not faster then Slim, Silex or Phalcon, no matter what is stated in the official documentation
  • Its size doesn’t make it a micro-framework
  • If you don’t like Laravel you’re not going to like this framework

Author Notes

I kind of like this framework. It’s fast though not fastest of them all; it’s easy to implement. While, in my experience not as fast as Slim or even Silex it has a MUCH better 3rd party support. Unfortunately, Laravel fame and some false marketing are hurting Lumen.
Continue Reading
  • Sask is also another micro framework which is really simple to work with. http://saskphp.com

  • hernan

    Nice review.
    BTW, your blog has some strange problem with my browser (Chrome 33, Win) that makes an uncomfortable reading: unless I resize the window width to less than 1024 px, a few letters of the paragraphs text overflows the window on the righ (this should not happen) and still Chrome does not show the horizontal scroll bar.

  • hernan
    • Thanks for your comment you were very proactive and helpful. I will fix this problem as soon as possible.

      Edit: Hm interesting, I’ve recreated this problem, also found another one. Apparently I have a problem with my CSS media queries on certain resolutions.

  • There seems to be some typo (missing ; ) in
    Also, the divs

    show (when inspected on Chrome) at ridicolous large heigth (all the window, it seems).
    Anyway, I’d say that Chrome should be to blame, partially at least. It seems to get confused with the width, it draw outside the window but still believes that everything fits (no horizontal scrollbar, the right arrow key does not work)

  • Ah, the commenting system ate my html…
    Let’s try again escaping…

    typo in: < div class="blog-article-content rich-content" >

    very tall divs: < div style="width:100%height: 0.35em;" >

  • Thanks for the review but i think you are discussing about micro frameworks but all of them are not micro at least the Phalcon doesn’t belong to micro level and if you didn’t try Laravel (http://laravel.com) yet then you should check it, one of the bests for now, trnding 🙂

    • Micky Loranger

      Hi Sheikh Heera,

      what are the advantages that laravel offer? It looks great!

      Thks

  • I really thank you for this article, it saved me a lot of time digging to find out witch framework is best for me.

  • Johnny Mnemonic

    And what about Sija framework? http://chermenin.github.io/sija/

  • Thibaud

    Hi, thank you for this post.
    I also like Slim framework and you mentioned a solution in order to handle large routing file, are you talking about http://nesbot.com/2012/11/5/lazy-loading-slim-controllers-using-pimple or another solution ?

  • Kamil Ilyas

    Hello,

    Im very thankful for your post here, it really helped me a lot in choosing my next micro. A quick question though, can u explain a little on the security aspects of phalcon, slim and wave ? and how do they cater them. Also, if you have any other better micro in terms of security, do let me know, thanks in advance 🙂

  • Micky Loranger

    Thank you very much for this article. Can you please make something similar with migrations and oauh2 mini frameworks? Thank in advance

  • I suggest Yee, a rather new Framework…. worth a try. Good documentation and the Developers behind it are very helpful.

  • Hey,

    Did you checked out aura ?

    Here is a quick start http://auraphp.com/manuals/2.0/en/quick-start/ .

    It is purely micro framework! .

    • Thank you for this information, I will check it.

  • Pingback: PHP Slim Micro Framework - Brett's Blog()

  • OnePHP is perfect and pretty simple too.
    http://oneframework.net/

  • Volker

    Yii2 may not be a Micro Framework anymore. But you can put up a Rest service very easy: http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.htm

  • Mike

    Good article. One suggestion, run a spell-check 😉

  • aldo cuevas

    Hello i read all frameworks but which it is best for you

    • Silex then Phalcon. But that’s just my opinion.

  • Don’t forget about Lumen, the micro framework by Laravel: http://lumen.laravel.com/

    • wmac

      I also want to know Dragan’s opinion about it.

      • I like it a lot, unfortunately, I haven’t had time to add it on this list. Give me few days and I will do it.

  • wmac

    I know it is not easy to assign scores, but I really liked what you did in one of your comparisons with scores.

    It would be nice if these comparisons could have them too.

    • Thanks for this suggestion, I will try to devise a fair score system.

  • Robert Anthonie Soriano

    Should I use a micro framework or full stack like laravel with my project? My project is a government website, the dynamic part and those with admin side are the news, events and gallery.

    • If you’re working on a government job, I would advise using a full stack framework. There’s a good chance they’ll require more and more features so smart move would be to go with the best framework you can master. Initially, it will take you more time to set everything up but you’ll make it up on a long run.

      • Robert Anthonie Soriano

        Yes thanks. I’m using laravel

  • shruti aggarwal

    I am new to php and have to choose a rest api framework for a mobile apps where there is max 30-40 rest apis. which rest api framework will be best for me ? Any suggestions

    • It depends on a number of calls per second. My advice, go with Phalcon if you need raw speed.

      • Eduardo Moura

        Slim

    • Eduardo Moura

      First we make a restful api with the necessary routes, offering json resources, listing something (GET), registration something (POST).

      Then do the consumers of these resources json. may be on Android, iOS, WinMobile, and even (HTML5 JS CSS3)

    • Eduardo Moura

      And if you are working with HTML views but on a project (consumer) PHP, to consume the routes of API in json, we need the cURL library.

  • GT

    First of all, thanks to the author for this very nice article. I have 14 year php experience, but until now, I had to use more robust frameworks, build my own, or use one that others build privately. Now I’m looking for framework to create backend for a frontend which will based on angular or polymer.

    After inspecting all of these frameworks, I’m hesitating between phalcon and lumen.

    Phalcon looks extremely flexible! MVC functionality is optional for example. It’s data handling seems really well thought up, mature and feature rich. This is the real strength of it. You can even use only for that. There are also quite lot amount of 3rd party resources available (the blog author didn’t mention this important factor besides 3rd party support). While it’s not a requirement for me, but the bootstrap support is big plus for me (It’s well known for me). The php-extension nature makes it more unique, gives speed, but since I can’t debug it via xdebug, can cause problems for me. In many cases, debugging helps understand the code even faster than any amount or quality or documentation. Has great documentation. I don’t care about lower 3rd party support now.

    While I like Lumen’s ability to convert into a robust, very feature rich framework. It’s structure and usage shows similarity to some other framework like Slim, I see as de facto standard at these type of frameworks. It looks very mature and has great documentation.

  • David Berlioz

    Hi, very good stuff !
    What do u thiink about Restler ?
    http://www.luracast.com/products/restler

    • Never heard of it, give me some time and I’ll take a look.

  • Another inaccurate article taking a gaunt at Lumen’s speed. It’s been confirmed that Lumen is the most performant micro-Framework to date.

    • And tham my friend is called a weasel statement, google it.

      1. Who has confirmed that?
      2. On top of what data?
      3. Most performant PHP micro-Framework? What about Java and .NET?

      I hope you get a gist.

      • “The benchmarks themselves are actually really simple. I use a Homestead VM since that is something anyone can recreate. In my tests, I allocated 2GB of RAM to the machine. Of course, benchmark numbers are going to vary depending on the hardware of your host machine. I personally am running benchmarks on a 2012 Macbook Pro Retina 15″ with 16GB of RAM. So, don’t be surprised if your numbers are different than my numbers." ~ Taylor Otwell (Creator of Lumen)

  • Eric

    Wrong, Lumen is the fastest of all micro framework and besides 3 Slim has been updated in the butts to improve the speed knowing that Lumen has basic library of more than Slim. Lumen is top notch for a small application instance with most unlike Slim or otherwise. You could even add a category limit “very little micro framework " for the framework as bullet or slim.
    Thank you for this article

    • Mark

      It depends how you define fast but Lumen certainly isn’t the fastest, Phalcon is by far the fastest in terms of response times and request per second because its Libary is written in C, no pure PHP implementation will ever be able to compete with that

      • Eric

        Sure, but there we are not comparing the same things. Besides Zend Framework should have taken a direction as to Phalcon , allow users the option of using a php framework in compiled dll taking example of Phalcon but Phalcon not a very practical framework on long- term projects , professionally and in a team.

        • Davey McNight

          How is not practical for long term projects and teams? It is really easy to extend and if you have Phalcon Devtools it is to generate your classes.

          • Trent Ramseyer

            He thinks it is not practical because he likes Lumen, he somehow has turned a blind eye to anything that is actually faster than Lumen, Phalcon Full Framework is faster than Lumen. Codeigniter 3 is faster than Lumen, Phpixie is faster than Lumen. There should be a category for bloated frameworks so Laravel can shine in that category.

  • hemant menaria

    In my openion right now Laravel is the first choice of developers.

  • Brick Heck

    We don’t trust components such as Composer, on our server, so many of these frameworks will not do.

    • Trent Ramseyer

      Most of PHP development world is moving to packages and Composer install… so not sure why you wouldn’t trust a Composer package vs an all inclusive framework. You will have to vet them equally for malware.

  • FireFalcon

    Our team is planning to develop a large REST API that will deal with large amount of data and speed is a primary issue in here.
    Which framework do you suggest? Can we go with micro-frameworks?

  • Some good new tools to consider without having to write everything from scratch.
    https://apigility.org/ (zend based)
    https://api-platform.com/ (symfony based)
    And another popular framework which makes rest services easy.
    http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.html (yii2)

    • Thank you very much; I will review them and add them in my next article update.

    • Maksim Muruev

      Api platform looks good.. but! Spend a lot of time just to make it works! Doc outdated, no body cares. So if your time is really short not best choice at all.

      • I found the opposite. It was up and running in a couple of minutes and there is an active slack channel and bitter room where people will help out.
        It’s also based on symfony which should make it easier for people who already use it.

        • Maksim Muruev

          Depends from the task I think. I need Crypto field and Dynamic fields ‘json’ but Symfony bundles support only Psql for this! And this framework actually expects only Mysql. It even hardcoded in the tests. Each shanges I have to remove dir in ‘var’…

          • Ah ok, I think I saw you in the gitter group. Maybe try asking in the symfony-devs slack group as the creator is around there in the api-platform channel.

HOT STUFF

High quality Ionic Framework themes, templates and components .
Page 3
Link Documentation

Pro

  • Fastest RETful micro framework available
  • Speed alone places it in whole separate category
  • Extremely optimized and modular, use only what you need or want
  • Excellent documentation, unfortunately not that much 3rd party community support, at lease compared to Silex and Slim. But don’t let this discourage you, you will still find more than enough information.
  • C-language based ORM, especially important if you are creating DB oriented application

Con

  • Nothing special. It doesn’t have such a great vibe like Silex or Slim.

Author Notes

Slim out of a way, this would be my number 1 framework. It is the framework of choice for my next project. I’m giving it thumbs up plus my recommendations.

More Information

6. Recess PHP

Link Documentation

Pro

  • Fast and easy
  • Great documentation with video tutorials

Con

  • Lack of support of any kind
  • Last update: 4+ years ago (2010)
  • This framework is dead as a doornail

Author Notes

Just skip this one. While it is fast, offering you an excellent intro documentation, it is not in actively developed anymore. The official forum is dead, and almost everyone abandoned it.
Continue Reading
  • Sask is also another micro framework which is really simple to work with. http://saskphp.com

  • hernan

    Nice review.
    BTW, your blog has some strange problem with my browser (Chrome 33, Win) that makes an uncomfortable reading: unless I resize the window width to less than 1024 px, a few letters of the paragraphs text overflows the window on the righ (this should not happen) and still Chrome does not show the horizontal scroll bar.

  • hernan
    • Thanks for your comment you were very proactive and helpful. I will fix this problem as soon as possible.

      Edit: Hm interesting, I’ve recreated this problem, also found another one. Apparently I have a problem with my CSS media queries on certain resolutions.

  • There seems to be some typo (missing ; ) in
    Also, the divs

    show (when inspected on Chrome) at ridicolous large heigth (all the window, it seems).
    Anyway, I’d say that Chrome should be to blame, partially at least. It seems to get confused with the width, it draw outside the window but still believes that everything fits (no horizontal scrollbar, the right arrow key does not work)

  • Ah, the commenting system ate my html…
    Let’s try again escaping…

    typo in: < div class="blog-article-content rich-content" >

    very tall divs: < div style="width:100%height: 0.35em;" >

  • Thanks for the review but i think you are discussing about micro frameworks but all of them are not micro at least the Phalcon doesn’t belong to micro level and if you didn’t try Laravel (http://laravel.com) yet then you should check it, one of the bests for now, trnding 🙂

    • Micky Loranger

      Hi Sheikh Heera,

      what are the advantages that laravel offer? It looks great!

      Thks

  • I really thank you for this article, it saved me a lot of time digging to find out witch framework is best for me.

  • Johnny Mnemonic

    And what about Sija framework? http://chermenin.github.io/sija/

  • Thibaud

    Hi, thank you for this post.
    I also like Slim framework and you mentioned a solution in order to handle large routing file, are you talking about http://nesbot.com/2012/11/5/lazy-loading-slim-controllers-using-pimple or another solution ?

  • Kamil Ilyas

    Hello,

    Im very thankful for your post here, it really helped me a lot in choosing my next micro. A quick question though, can u explain a little on the security aspects of phalcon, slim and wave ? and how do they cater them. Also, if you have any other better micro in terms of security, do let me know, thanks in advance 🙂

  • Micky Loranger

    Thank you very much for this article. Can you please make something similar with migrations and oauh2 mini frameworks? Thank in advance

  • I suggest Yee, a rather new Framework…. worth a try. Good documentation and the Developers behind it are very helpful.

  • Hey,

    Did you checked out aura ?

    Here is a quick start http://auraphp.com/manuals/2.0/en/quick-start/ .

    It is purely micro framework! .

    • Thank you for this information, I will check it.

  • Pingback: PHP Slim Micro Framework - Brett's Blog()

  • OnePHP is perfect and pretty simple too.
    http://oneframework.net/

  • Volker

    Yii2 may not be a Micro Framework anymore. But you can put up a Rest service very easy: http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.htm

  • Mike

    Good article. One suggestion, run a spell-check 😉

  • aldo cuevas

    Hello i read all frameworks but which it is best for you

    • Silex then Phalcon. But that’s just my opinion.

  • Don’t forget about Lumen, the micro framework by Laravel: http://lumen.laravel.com/

    • wmac

      I also want to know Dragan’s opinion about it.

      • I like it a lot, unfortunately, I haven’t had time to add it on this list. Give me few days and I will do it.

  • wmac

    I know it is not easy to assign scores, but I really liked what you did in one of your comparisons with scores.

    It would be nice if these comparisons could have them too.

    • Thanks for this suggestion, I will try to devise a fair score system.

  • Robert Anthonie Soriano

    Should I use a micro framework or full stack like laravel with my project? My project is a government website, the dynamic part and those with admin side are the news, events and gallery.

    • If you’re working on a government job, I would advise using a full stack framework. There’s a good chance they’ll require more and more features so smart move would be to go with the best framework you can master. Initially, it will take you more time to set everything up but you’ll make it up on a long run.

      • Robert Anthonie Soriano

        Yes thanks. I’m using laravel

  • shruti aggarwal

    I am new to php and have to choose a rest api framework for a mobile apps where there is max 30-40 rest apis. which rest api framework will be best for me ? Any suggestions

    • It depends on a number of calls per second. My advice, go with Phalcon if you need raw speed.

      • Eduardo Moura

        Slim

    • Eduardo Moura

      First we make a restful api with the necessary routes, offering json resources, listing something (GET), registration something (POST).

      Then do the consumers of these resources json. may be on Android, iOS, WinMobile, and even (HTML5 JS CSS3)

    • Eduardo Moura

      And if you are working with HTML views but on a project (consumer) PHP, to consume the routes of API in json, we need the cURL library.

  • GT

    First of all, thanks to the author for this very nice article. I have 14 year php experience, but until now, I had to use more robust frameworks, build my own, or use one that others build privately. Now I’m looking for framework to create backend for a frontend which will based on angular or polymer.

    After inspecting all of these frameworks, I’m hesitating between phalcon and lumen.

    Phalcon looks extremely flexible! MVC functionality is optional for example. It’s data handling seems really well thought up, mature and feature rich. This is the real strength of it. You can even use only for that. There are also quite lot amount of 3rd party resources available (the blog author didn’t mention this important factor besides 3rd party support). While it’s not a requirement for me, but the bootstrap support is big plus for me (It’s well known for me). The php-extension nature makes it more unique, gives speed, but since I can’t debug it via xdebug, can cause problems for me. In many cases, debugging helps understand the code even faster than any amount or quality or documentation. Has great documentation. I don’t care about lower 3rd party support now.

    While I like Lumen’s ability to convert into a robust, very feature rich framework. It’s structure and usage shows similarity to some other framework like Slim, I see as de facto standard at these type of frameworks. It looks very mature and has great documentation.

  • David Berlioz

    Hi, very good stuff !
    What do u thiink about Restler ?
    http://www.luracast.com/products/restler

    • Never heard of it, give me some time and I’ll take a look.

  • Another inaccurate article taking a gaunt at Lumen’s speed. It’s been confirmed that Lumen is the most performant micro-Framework to date.

    • And tham my friend is called a weasel statement, google it.

      1. Who has confirmed that?
      2. On top of what data?
      3. Most performant PHP micro-Framework? What about Java and .NET?

      I hope you get a gist.

      • “The benchmarks themselves are actually really simple. I use a Homestead VM since that is something anyone can recreate. In my tests, I allocated 2GB of RAM to the machine. Of course, benchmark numbers are going to vary depending on the hardware of your host machine. I personally am running benchmarks on a 2012 Macbook Pro Retina 15″ with 16GB of RAM. So, don’t be surprised if your numbers are different than my numbers." ~ Taylor Otwell (Creator of Lumen)

  • Eric

    Wrong, Lumen is the fastest of all micro framework and besides 3 Slim has been updated in the butts to improve the speed knowing that Lumen has basic library of more than Slim. Lumen is top notch for a small application instance with most unlike Slim or otherwise. You could even add a category limit “very little micro framework " for the framework as bullet or slim.
    Thank you for this article

    • Mark

      It depends how you define fast but Lumen certainly isn’t the fastest, Phalcon is by far the fastest in terms of response times and request per second because its Libary is written in C, no pure PHP implementation will ever be able to compete with that

      • Eric

        Sure, but there we are not comparing the same things. Besides Zend Framework should have taken a direction as to Phalcon , allow users the option of using a php framework in compiled dll taking example of Phalcon but Phalcon not a very practical framework on long- term projects , professionally and in a team.

        • Davey McNight

          How is not practical for long term projects and teams? It is really easy to extend and if you have Phalcon Devtools it is to generate your classes.

          • Trent Ramseyer

            He thinks it is not practical because he likes Lumen, he somehow has turned a blind eye to anything that is actually faster than Lumen, Phalcon Full Framework is faster than Lumen. Codeigniter 3 is faster than Lumen, Phpixie is faster than Lumen. There should be a category for bloated frameworks so Laravel can shine in that category.

  • hemant menaria

    In my openion right now Laravel is the first choice of developers.

  • Brick Heck

    We don’t trust components such as Composer, on our server, so many of these frameworks will not do.

    • Trent Ramseyer

      Most of PHP development world is moving to packages and Composer install… so not sure why you wouldn’t trust a Composer package vs an all inclusive framework. You will have to vet them equally for malware.

  • FireFalcon

    Our team is planning to develop a large REST API that will deal with large amount of data and speed is a primary issue in here.
    Which framework do you suggest? Can we go with micro-frameworks?

  • Some good new tools to consider without having to write everything from scratch.
    https://apigility.org/ (zend based)
    https://api-platform.com/ (symfony based)
    And another popular framework which makes rest services easy.
    http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.html (yii2)

    • Thank you very much; I will review them and add them in my next article update.

    • Maksim Muruev

      Api platform looks good.. but! Spend a lot of time just to make it works! Doc outdated, no body cares. So if your time is really short not best choice at all.

      • I found the opposite. It was up and running in a couple of minutes and there is an active slack channel and bitter room where people will help out.
        It’s also based on symfony which should make it easier for people who already use it.

        • Maksim Muruev

          Depends from the task I think. I need Crypto field and Dynamic fields ‘json’ but Symfony bundles support only Psql for this! And this framework actually expects only Mysql. It even hardcoded in the tests. Each shanges I have to remove dir in ‘var’…

          • Ah ok, I think I saw you in the gitter group. Maybe try asking in the symfony-devs slack group as the creator is around there in the api-platform channel.

HOT STUFF

High quality Ionic Framework themes, templates and components .
Page 4

Links

Official Site Documentation Installation, Working Example

Pro

  • One of the fastest micro RESTful PHP frameworks, arguably TOP 5
  • Currently best-known framework of this type. At the same time this is the primary reason why I’m not using it
  • Built on Symphony components and modular, use only what you need
  • Great documentation plus 3rd party community support
  • Excellent for large projects

Con

  • Nothing special

Author Notes

Silex is another great if not the best micro RESTful PHP framework. It connection to Symphony guarantees stable implementation with a lot of available resources. I would argue that only Slim framework can count as a real competition.

Additional info

8. Slim

Link Documentation

Pro

  • Slim is one of the fastest micro RESTful frameworks available
  • Good documentation (it could be better), and then again, a slim framework requires slim documentation
  • Provides you with every feature this kind of framework should have, and nothing more, which is great
  • Unlike a lot of other frameworks Slim has a very large following, basically a lot of resources are available online, from original website plus a lot of 3rd party content, including youtube tutorials
  • It has a solution for large routing files in lazy loading. It requires 3rd party implementation so think about it.

Con

  • Nothing special.

Author Notes

Slim is my first and primary choice. I would recommend spending some time with it, you would not regret it.

Additional info

Continue Reading
  • Sask is also another micro framework which is really simple to work with. http://saskphp.com

  • hernan

    Nice review.
    BTW, your blog has some strange problem with my browser (Chrome 33, Win) that makes an uncomfortable reading: unless I resize the window width to less than 1024 px, a few letters of the paragraphs text overflows the window on the righ (this should not happen) and still Chrome does not show the horizontal scroll bar.

  • hernan
    • Thanks for your comment you were very proactive and helpful. I will fix this problem as soon as possible.

      Edit: Hm interesting, I’ve recreated this problem, also found another one. Apparently I have a problem with my CSS media queries on certain resolutions.

  • There seems to be some typo (missing ; ) in
    Also, the divs

    show (when inspected on Chrome) at ridicolous large heigth (all the window, it seems).
    Anyway, I’d say that Chrome should be to blame, partially at least. It seems to get confused with the width, it draw outside the window but still believes that everything fits (no horizontal scrollbar, the right arrow key does not work)

  • Ah, the commenting system ate my html…
    Let’s try again escaping…

    typo in: < div class="blog-article-content rich-content" >

    very tall divs: < div style="width:100%height: 0.35em;" >

  • Thanks for the review but i think you are discussing about micro frameworks but all of them are not micro at least the Phalcon doesn’t belong to micro level and if you didn’t try Laravel (http://laravel.com) yet then you should check it, one of the bests for now, trnding 🙂

    • Micky Loranger

      Hi Sheikh Heera,

      what are the advantages that laravel offer? It looks great!

      Thks

  • I really thank you for this article, it saved me a lot of time digging to find out witch framework is best for me.

  • Johnny Mnemonic

    And what about Sija framework? http://chermenin.github.io/sija/

  • Thibaud

    Hi, thank you for this post.
    I also like Slim framework and you mentioned a solution in order to handle large routing file, are you talking about http://nesbot.com/2012/11/5/lazy-loading-slim-controllers-using-pimple or another solution ?

  • Kamil Ilyas

    Hello,

    Im very thankful for your post here, it really helped me a lot in choosing my next micro. A quick question though, can u explain a little on the security aspects of phalcon, slim and wave ? and how do they cater them. Also, if you have any other better micro in terms of security, do let me know, thanks in advance 🙂

  • Micky Loranger

    Thank you very much for this article. Can you please make something similar with migrations and oauh2 mini frameworks? Thank in advance

  • I suggest Yee, a rather new Framework…. worth a try. Good documentation and the Developers behind it are very helpful.

  • Hey,

    Did you checked out aura ?

    Here is a quick start http://auraphp.com/manuals/2.0/en/quick-start/ .

    It is purely micro framework! .

    • Thank you for this information, I will check it.

  • Pingback: PHP Slim Micro Framework - Brett's Blog()

  • OnePHP is perfect and pretty simple too.
    http://oneframework.net/

  • Volker

    Yii2 may not be a Micro Framework anymore. But you can put up a Rest service very easy: http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.htm

  • Mike

    Good article. One suggestion, run a spell-check 😉

  • aldo cuevas

    Hello i read all frameworks but which it is best for you

    • Silex then Phalcon. But that’s just my opinion.

  • Don’t forget about Lumen, the micro framework by Laravel: http://lumen.laravel.com/

    • wmac

      I also want to know Dragan’s opinion about it.

      • I like it a lot, unfortunately, I haven’t had time to add it on this list. Give me few days and I will do it.

  • wmac

    I know it is not easy to assign scores, but I really liked what you did in one of your comparisons with scores.

    It would be nice if these comparisons could have them too.

    • Thanks for this suggestion, I will try to devise a fair score system.

  • Robert Anthonie Soriano

    Should I use a micro framework or full stack like laravel with my project? My project is a government website, the dynamic part and those with admin side are the news, events and gallery.

    • If you’re working on a government job, I would advise using a full stack framework. There’s a good chance they’ll require more and more features so smart move would be to go with the best framework you can master. Initially, it will take you more time to set everything up but you’ll make it up on a long run.

      • Robert Anthonie Soriano

        Yes thanks. I’m using laravel

  • shruti aggarwal

    I am new to php and have to choose a rest api framework for a mobile apps where there is max 30-40 rest apis. which rest api framework will be best for me ? Any suggestions

    • It depends on a number of calls per second. My advice, go with Phalcon if you need raw speed.

      • Eduardo Moura

        Slim

    • Eduardo Moura

      First we make a restful api with the necessary routes, offering json resources, listing something (GET), registration something (POST).

      Then do the consumers of these resources json. may be on Android, iOS, WinMobile, and even (HTML5 JS CSS3)

    • Eduardo Moura

      And if you are working with HTML views but on a project (consumer) PHP, to consume the routes of API in json, we need the cURL library.

  • GT

    First of all, thanks to the author for this very nice article. I have 14 year php experience, but until now, I had to use more robust frameworks, build my own, or use one that others build privately. Now I’m looking for framework to create backend for a frontend which will based on angular or polymer.

    After inspecting all of these frameworks, I’m hesitating between phalcon and lumen.

    Phalcon looks extremely flexible! MVC functionality is optional for example. It’s data handling seems really well thought up, mature and feature rich. This is the real strength of it. You can even use only for that. There are also quite lot amount of 3rd party resources available (the blog author didn’t mention this important factor besides 3rd party support). While it’s not a requirement for me, but the bootstrap support is big plus for me (It’s well known for me). The php-extension nature makes it more unique, gives speed, but since I can’t debug it via xdebug, can cause problems for me. In many cases, debugging helps understand the code even faster than any amount or quality or documentation. Has great documentation. I don’t care about lower 3rd party support now.

    While I like Lumen’s ability to convert into a robust, very feature rich framework. It’s structure and usage shows similarity to some other framework like Slim, I see as de facto standard at these type of frameworks. It looks very mature and has great documentation.

  • David Berlioz

    Hi, very good stuff !
    What do u thiink about Restler ?
    http://www.luracast.com/products/restler

    • Never heard of it, give me some time and I’ll take a look.

  • Another inaccurate article taking a gaunt at Lumen’s speed. It’s been confirmed that Lumen is the most performant micro-Framework to date.

    • And tham my friend is called a weasel statement, google it.

      1. Who has confirmed that?
      2. On top of what data?
      3. Most performant PHP micro-Framework? What about Java and .NET?

      I hope you get a gist.

      • “The benchmarks themselves are actually really simple. I use a Homestead VM since that is something anyone can recreate. In my tests, I allocated 2GB of RAM to the machine. Of course, benchmark numbers are going to vary depending on the hardware of your host machine. I personally am running benchmarks on a 2012 Macbook Pro Retina 15″ with 16GB of RAM. So, don’t be surprised if your numbers are different than my numbers." ~ Taylor Otwell (Creator of Lumen)

  • Eric

    Wrong, Lumen is the fastest of all micro framework and besides 3 Slim has been updated in the butts to improve the speed knowing that Lumen has basic library of more than Slim. Lumen is top notch for a small application instance with most unlike Slim or otherwise. You could even add a category limit “very little micro framework " for the framework as bullet or slim.
    Thank you for this article

    • Mark

      It depends how you define fast but Lumen certainly isn’t the fastest, Phalcon is by far the fastest in terms of response times and request per second because its Libary is written in C, no pure PHP implementation will ever be able to compete with that

      • Eric

        Sure, but there we are not comparing the same things. Besides Zend Framework should have taken a direction as to Phalcon , allow users the option of using a php framework in compiled dll taking example of Phalcon but Phalcon not a very practical framework on long- term projects , professionally and in a team.

        • Davey McNight

          How is not practical for long term projects and teams? It is really easy to extend and if you have Phalcon Devtools it is to generate your classes.

          • Trent Ramseyer

            He thinks it is not practical because he likes Lumen, he somehow has turned a blind eye to anything that is actually faster than Lumen, Phalcon Full Framework is faster than Lumen. Codeigniter 3 is faster than Lumen, Phpixie is faster than Lumen. There should be a category for bloated frameworks so Laravel can shine in that category.

  • hemant menaria

    In my openion right now Laravel is the first choice of developers.

  • Brick Heck

    We don’t trust components such as Composer, on our server, so many of these frameworks will not do.

    • Trent Ramseyer

      Most of PHP development world is moving to packages and Composer install… so not sure why you wouldn’t trust a Composer package vs an all inclusive framework. You will have to vet them equally for malware.

  • FireFalcon

    Our team is planning to develop a large REST API that will deal with large amount of data and speed is a primary issue in here.
    Which framework do you suggest? Can we go with micro-frameworks?

  • Some good new tools to consider without having to write everything from scratch.
    https://apigility.org/ (zend based)
    https://api-platform.com/ (symfony based)
    And another popular framework which makes rest services easy.
    http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.html (yii2)

    • Thank you very much; I will review them and add them in my next article update.

    • Maksim Muruev

      Api platform looks good.. but! Spend a lot of time just to make it works! Doc outdated, no body cares. So if your time is really short not best choice at all.

      • I found the opposite. It was up and running in a couple of minutes and there is an active slack channel and bitter room where people will help out.
        It’s also based on symfony which should make it easier for people who already use it.

        • Maksim Muruev

          Depends from the task I think. I need Crypto field and Dynamic fields ‘json’ but Symfony bundles support only Psql for this! And this framework actually expects only Mysql. It even hardcoded in the tests. Each shanges I have to remove dir in ‘var’…

          • Ah ok, I think I saw you in the gitter group. Maybe try asking in the symfony-devs slack group as the creator is around there in the api-platform channel.

HOT STUFF

High quality Ionic Framework themes, templates and components .
Page 5
Link Documentation

Pro

  • It works. I don’t have nothing else positive to say about Tonic.

Con

  • It takes a lot of time to get used to, time we can spend on any other frameworks
  • Worst documentation I ever so
  • This is a good option if you have a good knowledge how other similar frameworks work (usually not the case).
  • Github page has more useful information the framework web page

Author Notes

This framework is not a bad choice. Unfortunately, other frameworks have better documentation and additional features this kind of framework should have.

10. The One Framework

Just like the Lumen, the One Framework is a rather new addition to a micro-framework world. Though, unlike Lumen, The One framework is a real MICRO-framework. Official Site Link Documentation

Pro

  • Fast though I haven’t had time to benchmark it properly, especially compared to other frameworks
  • Extremly small
  • No dependencies, add extra libraries only when you need it.
  • Based on Symfony and ExpressJS

Con

  • Rudimental documentation
  • Not for novice developers
  • Not suitable for full stack projects and from my experience it will not play well with some 3rd party plugins/frameworks, mainly ORM-s.

Author Notes

While this framework is not suited for larger projects, I successfully implement it into one of my smaller projects, and it’s working surprisingly well. Of course, it took me some time to make it work, still I would like to recommend this framework on behalf of its size and speed. Again, not to be used for larger projects.
Continue Reading
  • Sask is also another micro framework which is really simple to work with. http://saskphp.com

  • hernan

    Nice review.
    BTW, your blog has some strange problem with my browser (Chrome 33, Win) that makes an uncomfortable reading: unless I resize the window width to less than 1024 px, a few letters of the paragraphs text overflows the window on the righ (this should not happen) and still Chrome does not show the horizontal scroll bar.

  • hernan
    • Thanks for your comment you were very proactive and helpful. I will fix this problem as soon as possible.

      Edit: Hm interesting, I’ve recreated this problem, also found another one. Apparently I have a problem with my CSS media queries on certain resolutions.

  • There seems to be some typo (missing ; ) in
    Also, the divs

    show (when inspected on Chrome) at ridicolous large heigth (all the window, it seems).
    Anyway, I’d say that Chrome should be to blame, partially at least. It seems to get confused with the width, it draw outside the window but still believes that everything fits (no horizontal scrollbar, the right arrow key does not work)

  • Ah, the commenting system ate my html…
    Let’s try again escaping…

    typo in: < div class="blog-article-content rich-content" >

    very tall divs: < div style="width:100%height: 0.35em;" >

  • Thanks for the review but i think you are discussing about micro frameworks but all of them are not micro at least the Phalcon doesn’t belong to micro level and if you didn’t try Laravel (http://laravel.com) yet then you should check it, one of the bests for now, trnding 🙂

    • Micky Loranger

      Hi Sheikh Heera,

      what are the advantages that laravel offer? It looks great!

      Thks

  • I really thank you for this article, it saved me a lot of time digging to find out witch framework is best for me.

  • Johnny Mnemonic

    And what about Sija framework? http://chermenin.github.io/sija/

  • Thibaud

    Hi, thank you for this post.
    I also like Slim framework and you mentioned a solution in order to handle large routing file, are you talking about http://nesbot.com/2012/11/5/lazy-loading-slim-controllers-using-pimple or another solution ?

  • Kamil Ilyas

    Hello,

    Im very thankful for your post here, it really helped me a lot in choosing my next micro. A quick question though, can u explain a little on the security aspects of phalcon, slim and wave ? and how do they cater them. Also, if you have any other better micro in terms of security, do let me know, thanks in advance 🙂

  • Micky Loranger

    Thank you very much for this article. Can you please make something similar with migrations and oauh2 mini frameworks? Thank in advance

  • I suggest Yee, a rather new Framework…. worth a try. Good documentation and the Developers behind it are very helpful.

  • Hey,

    Did you checked out aura ?

    Here is a quick start http://auraphp.com/manuals/2.0/en/quick-start/ .

    It is purely micro framework! .

    • Thank you for this information, I will check it.

  • Pingback: PHP Slim Micro Framework - Brett's Blog()

  • OnePHP is perfect and pretty simple too.
    http://oneframework.net/

  • Volker

    Yii2 may not be a Micro Framework anymore. But you can put up a Rest service very easy: http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.htm

  • Mike

    Good article. One suggestion, run a spell-check 😉

  • aldo cuevas

    Hello i read all frameworks but which it is best for you

    • Silex then Phalcon. But that’s just my opinion.

  • Don’t forget about Lumen, the micro framework by Laravel: http://lumen.laravel.com/

    • wmac

      I also want to know Dragan’s opinion about it.

      • I like it a lot, unfortunately, I haven’t had time to add it on this list. Give me few days and I will do it.

  • wmac

    I know it is not easy to assign scores, but I really liked what you did in one of your comparisons with scores.

    It would be nice if these comparisons could have them too.

    • Thanks for this suggestion, I will try to devise a fair score system.

  • Robert Anthonie Soriano

    Should I use a micro framework or full stack like laravel with my project? My project is a government website, the dynamic part and those with admin side are the news, events and gallery.

    • If you’re working on a government job, I would advise using a full stack framework. There’s a good chance they’ll require more and more features so smart move would be to go with the best framework you can master. Initially, it will take you more time to set everything up but you’ll make it up on a long run.

      • Robert Anthonie Soriano

        Yes thanks. I’m using laravel

  • shruti aggarwal

    I am new to php and have to choose a rest api framework for a mobile apps where there is max 30-40 rest apis. which rest api framework will be best for me ? Any suggestions

    • It depends on a number of calls per second. My advice, go with Phalcon if you need raw speed.

      • Eduardo Moura

        Slim

    • Eduardo Moura

      First we make a restful api with the necessary routes, offering json resources, listing something (GET), registration something (POST).

      Then do the consumers of these resources json. may be on Android, iOS, WinMobile, and even (HTML5 JS CSS3)

    • Eduardo Moura

      And if you are working with HTML views but on a project (consumer) PHP, to consume the routes of API in json, we need the cURL library.

  • GT

    First of all, thanks to the author for this very nice article. I have 14 year php experience, but until now, I had to use more robust frameworks, build my own, or use one that others build privately. Now I’m looking for framework to create backend for a frontend which will based on angular or polymer.

    After inspecting all of these frameworks, I’m hesitating between phalcon and lumen.

    Phalcon looks extremely flexible! MVC functionality is optional for example. It’s data handling seems really well thought up, mature and feature rich. This is the real strength of it. You can even use only for that. There are also quite lot amount of 3rd party resources available (the blog author didn’t mention this important factor besides 3rd party support). While it’s not a requirement for me, but the bootstrap support is big plus for me (It’s well known for me). The php-extension nature makes it more unique, gives speed, but since I can’t debug it via xdebug, can cause problems for me. In many cases, debugging helps understand the code even faster than any amount or quality or documentation. Has great documentation. I don’t care about lower 3rd party support now.

    While I like Lumen’s ability to convert into a robust, very feature rich framework. It’s structure and usage shows similarity to some other framework like Slim, I see as de facto standard at these type of frameworks. It looks very mature and has great documentation.

  • David Berlioz

    Hi, very good stuff !
    What do u thiink about Restler ?
    http://www.luracast.com/products/restler

    • Never heard of it, give me some time and I’ll take a look.

  • Another inaccurate article taking a gaunt at Lumen’s speed. It’s been confirmed that Lumen is the most performant micro-Framework to date.

    • And tham my friend is called a weasel statement, google it.

      1. Who has confirmed that?
      2. On top of what data?
      3. Most performant PHP micro-Framework? What about Java and .NET?

      I hope you get a gist.

      • “The benchmarks themselves are actually really simple. I use a Homestead VM since that is something anyone can recreate. In my tests, I allocated 2GB of RAM to the machine. Of course, benchmark numbers are going to vary depending on the hardware of your host machine. I personally am running benchmarks on a 2012 Macbook Pro Retina 15″ with 16GB of RAM. So, don’t be surprised if your numbers are different than my numbers." ~ Taylor Otwell (Creator of Lumen)

  • Eric

    Wrong, Lumen is the fastest of all micro framework and besides 3 Slim has been updated in the butts to improve the speed knowing that Lumen has basic library of more than Slim. Lumen is top notch for a small application instance with most unlike Slim or otherwise. You could even add a category limit “very little micro framework " for the framework as bullet or slim.
    Thank you for this article

    • Mark

      It depends how you define fast but Lumen certainly isn’t the fastest, Phalcon is by far the fastest in terms of response times and request per second because its Libary is written in C, no pure PHP implementation will ever be able to compete with that

      • Eric

        Sure, but there we are not comparing the same things. Besides Zend Framework should have taken a direction as to Phalcon , allow users the option of using a php framework in compiled dll taking example of Phalcon but Phalcon not a very practical framework on long- term projects , professionally and in a team.

        • Davey McNight

          How is not practical for long term projects and teams? It is really easy to extend and if you have Phalcon Devtools it is to generate your classes.

          • Trent Ramseyer

            He thinks it is not practical because he likes Lumen, he somehow has turned a blind eye to anything that is actually faster than Lumen, Phalcon Full Framework is faster than Lumen. Codeigniter 3 is faster than Lumen, Phpixie is faster than Lumen. There should be a category for bloated frameworks so Laravel can shine in that category.

  • hemant menaria

    In my openion right now Laravel is the first choice of developers.

  • Brick Heck

    We don’t trust components such as Composer, on our server, so many of these frameworks will not do.

    • Trent Ramseyer

      Most of PHP development world is moving to packages and Composer install… so not sure why you wouldn’t trust a Composer package vs an all inclusive framework. You will have to vet them equally for malware.

  • FireFalcon

    Our team is planning to develop a large REST API that will deal with large amount of data and speed is a primary issue in here.
    Which framework do you suggest? Can we go with micro-frameworks?

  • Some good new tools to consider without having to write everything from scratch.
    https://apigility.org/ (zend based)
    https://api-platform.com/ (symfony based)
    And another popular framework which makes rest services easy.
    http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.html (yii2)

    • Thank you very much; I will review them and add them in my next article update.

    • Maksim Muruev

      Api platform looks good.. but! Spend a lot of time just to make it works! Doc outdated, no body cares. So if your time is really short not best choice at all.

      • I found the opposite. It was up and running in a couple of minutes and there is an active slack channel and bitter room where people will help out.
        It’s also based on symfony which should make it easier for people who already use it.

        • Maksim Muruev

          Depends from the task I think. I need Crypto field and Dynamic fields ‘json’ but Symfony bundles support only Psql for this! And this framework actually expects only Mysql. It even hardcoded in the tests. Each shanges I have to remove dir in ‘var’…

          • Ah ok, I think I saw you in the gitter group. Maybe try asking in the symfony-devs slack group as the creator is around there in the api-platform channel.

HOT STUFF

High quality Ionic Framework themes, templates and components .
Page 6
Link Documentation

Pro

  • Fast after you learn how to use it.
  • Not fully MVC but good enough.
  • Great documentation.
  • Subjectively one of the best micro frameworks of its kind. It will provide you with everything you need and nothing more. This implementation is what other micro frameworks should stand for.
  • Unlike some other frameworks this framework was not created primarily for personal use
  • jQuery support. This may not be important to the majority of my readers, but my main goal was trying to find best micro PHP framework to serve my jQuery Mobile applications.
  • Another great thing is full UTF-8 support. You would not believe how many frameworks don’t have this supported.

Con

  • It takes a while to get used to
  • Everything is done through API commands. Not a bad approach, but it takes time to master. Provided documentation makes this problem less obvious.

Author Notes

I would strongly recommend this framework. It takes time to get used to but it delivers, and it is doing it fast. Technically this framework will offer you everything you need from this kind of micro frameworks without some additional bloatware functionality. I’m recommending this framework.

12. Zaphpa

Link Documentation

Pro

  • Fast after you somehow manage to make it work.

Con

  • Insufficient and small documentation.It may sound rude, but this is a micro documentation for a micro framework.
  • Can’t be used out of the box. Initial configuration requires web server access so forget using it without full permissions.
  • Does not offer anything more than the most fundamental functionality

Author Notes

I would not recommend using this framework for professional projects. It is not a bad framework. Unfortunately, you will need to spend some time learning how it works, and there’s always a good chance it will not work with some other part of your project.


comments powered by Disqus