Asking for recommendation on a PHP framework

Hello All,

I’m a skilled developer but I have not worked in PHP for seven years and so I am looking to kick start my framework research here.

I have a project coming up that will use LAMP stack. The project is a web based application for inventory control and process management. The users (50-100) are widely distributed. It will be heavily form driven with named users, role based permissions and many reports.

I am looking for a framework (and I’m happy to purchase one) that will ease the development burden of creating data entry forms, user/role permissions, page creation and writing reports. Any recommendations?

Thanks in advance!

Hi Pete,

Well you’re certainly not short on choices when it comes to PHP frameworks! The two big players are Zend and Symfony - very flexible but at the cost of some added complexity. I can’t speak for Symfony, but the Zend Framework has a lot of components that will probably cover 99% of the things you might want to do (including a forms component, which you might find useful). As for Symfony, it would be worth speaking to @Jeff_Mott, as I believe he uses it a lot.

You may find Zend and Symfony a bit heavyweight for your needs, but there are some other good frameworks out there. Symfony has a ‘cousin’ called Silex, which is probably worth checking out. Many people speak highly of Laravel (although I’ve not tried it myself), and I’ve used Kohana on a couple of projects and found it suited my style quite well.

CodeIgniter ( is another popular and well documented framework that I have seen rise in popularity in the Ohio area.

I’m a bit disappointed that I didn’t get any kind of notification about this mention. Makes me wonder if I was mentioned anywhere else but never knew about it.

I am looking for a framework (and I’m happy to purchase one) that will ease the development burden of creating data entry forms, user/role permissions, page creation and writing reports. Any recommendations?

As fretburner mentioned, I’m a big fan of Symfony. Overall, I think it’s extremely well architected and a fantastic model for good OOP and design patterns. Usually you’d think with frameworks that you’re sacrificing flexibility for structure, but Symfony never felt restrictive to me. You can compose every response in whatever manner you choose. You can use a templating engine or not. You can use an ORM or not. Symfony doesn’t lock you into anything.

If you’re looking to kick start your framework research, I recommend reading From Flat PHP to Symfony2. It takes you step-by-step from a traditional PHP script to an MVC structure to a Symfony application.

Then here’s an older post where I tried to give an abbreviated summary of workflow in Symfony.

And here’s a step-by-step tutorial that I started (but didn’t finish) for building an application in Symfony. Each commit represents a step of the tutorial.

I’ll second that. Good documentation is the key value here.

A framework is basically useless without documentation.

[edit]: Also, once you cut your teeth on one framework with good documentation, you can always move on to others that might have more/better features but lesser-quality documentation since you’ll have a better idea on how to work with and use frameworks.

Off Topic:

You can click the Notifications link at the top right of screen to see if you have any new ones. The count of your notifications is also shown below your avatar. And on your profile page, you can click the Mentions tab. But there is no automatic notification like an email. The Mention thing is an add-on that has limited functionality.

Tell that Drupal users but I agree.

One more for Symfony 2. The loosely coupled component based architecture using DIC beats all others in php. I would even go as far to say it beats Rails in many ways. Drupal 8 uses several Symfony 2 components. If that isn’t a testament to Symfony 2’s power and flexibility I don’t really know what is.

Jeff, Oddz, one thing I’ve heard said about Symfony 2 is that it’s quite slow/resource intensive compared to other frameworks (possibly such as CodeIgniter). As you both use Symfony, is that a fair charge? I realise that there’s probably some degree of overhead from having a more flexible and well engineered architecture, but I’m curious as to how noticeable that is in practice?

I do have to concede that in most every benchmark I’ve seen, Symfony typically ranks near last. Though, I also think it’s unclear how reliable those tests are. Many of them are little more than Hello World tests, which is irrelevant in the real world. Others try to measure every framework under the sun, in which case it’s highly unlikely they knew each framework equally well. And some don’t provide source code that would allow us to reproduce their results.

But what I can say, and what I’ve heard others say as well, is that all the frameworks are “fast enough.” A real-world page that uses Twig and Doctrine and the DB (5 queries), on my un-optimized Windows dev machine, will typically return a response within 150-200ms (running production code). On the optimized Linux machine, it’s typically 60-80ms. It doesn’t even matter if it’s the slowest framework. It’s plenty fast enough, and the features are well worth it.

Hard to say. As you say, benchmarks mean nothing if it’s just hello world anyway. Symfony also has great support for caching out of the box, and when combined with APC or EAccelerator and/or redis/memcached, you can get response times down to virtually nothing anyway.

Pretty sure youporn (or a similar scale porn site) uses symfony, so it’s clearly capable of dealing with very heavy traffic.

As a former Zend 1 guy, I have to say, Symfony has been a breath of fresh air to me so far. I love everything about it - from the way bundles work (and the way you can even include css/js in bundles) to the way unit testing works out of the box - even the twig templating system has been something of a revelation to me (I didn’t see the point at all until I found out about block level over-rides - ever since I can’t imagine working without it).

It works perfectly with composer too. I also love the fact that their philosophy is to improve stability over building new features too - such an excellent attitude to have.

Overall, I’d say it’s the best framework I’ve ever used. It may be a bit hard to learn for people who don’t know OOP well though. You’re gonna be using plenty of interfaces and OOP techniques, but if you understand that stuff, it’s brilliant.

For reference, here’s (safe for work) information about how youporn uses symfony 2:

Thank you so much everyone especially @fretburner & @Jeff_Mott.

That is high praise for Symfony and CodeIgnitor. Performance is not a concern today. I anticipate no more than 50 simultaneous users at the outset. Much of the user experience is data-entry and viewing reports. There is not much adhoc querying. I will check out the memory and session management for both.

Thank you, Thank you, Thank you!

Code Igniter was one I paid a previous employee used he seemed to love it.