What is best framework for PHP?

I have to use PHP to develop a website.
Can anyone please suggest which is the best framework between Cake and Symfony. I have to choose one of these two.

My website is a small to medium site for internal use in my company.
What will be benefits and limitation in using the one I should be selecting?
Who is Participating?
Ray PaseurCommented:
Start learning PHP here.  If you're a .net developer you'll pick it up very fast.

If your only choices are Symfony or Cake, and you absolutely can't choose Laravel, then I would go with Symfony.  You'll learn something about Drupal as a result, and Drupal experts are very well paid.
Mark BradyPrincipal Data EngineerCommented:
In my professional opinion you should use neither. Don't use any framework especially if you only have a small to medium site to administer. Using frameworks is great if you do not know any php and are not willing or have time to learn it but frameworks introduce many issues which I am not going to go into here.

Do yourself a favor and write down what you need the website to do. Build a schema of some sort then take it a piece at a time. you can look on google for how to do a particular task or post a question in here but in the end, if you write php in its native form you will be much better off because frameworks are limited to how they are written. Php is not limited and you can achieve anything you want to and get plenty of help and code examples right here.

Best of luck with either way you wish to go though.
Loganathan NatarajanLAMP DeveloperCommented:
I am not for best framework but to work for the project need, choose "Symfony" or Larvel. Seems both are fast growing and most people use as per Google Trend.

Recently, I read article about these frameworks here, http://www.sitepoint.com/best-php-frameworks-2014/

Each one of these frameworks have its pros and cons, so it is very hard to say which is good or bad.. it should be as per our need or competence or time to do the project work.

Overall, it is matter how we're going to do in what time period.
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Ray PaseurCommented:
You might want to ask yourself "why?"  If you don't already know PHP and you don't know the framework, then you have taken a single problem (PHP) and turned it into two problems (PHP + another unknown).  

The best framework is the one you already know.  So I agree with Elvin66.  I would avoid any framework until you know exactly what you want to do and how the framework supports your goals.  Try a few of them out before you make a commitment.

I also agree with Loganathan.  Laravel is getting a lot of traction right now.  So is Slim.  The people I know who are choosing these frameworks are experienced programmers and very knowledgeable computer scientists.

CodeIgniter is another option.  So is Zend.  There are a lot of frameworks, just like there are a lot of cars.  You would test drive a few and choose the one that makes the most sense for your needs.
Ray PaseurCommented:
Afterthought... Have you considered WordPress?  Their entire codex is online.  It is by far the most popular of the frameworks and has a large community of developers with lots of themes, plug-ins and widgets.
RajG1978Author Commented:
Basically I am a .net developer, my boss wants me to develop a website in PHP using Symfony or Cake framework. I do not know PHP, I have learn it too, suggestions please.
The setup of syntax and the code relationships are MUCH different in the microsoft web server code, and the PHP web server code, so to try and ignorantly bang and push together a PHP web site, even with a framework, is not something you want to do, and have much if any success, except on the most simple web site. It will take you some time and trial and error to even get the normal php code variations from VB, C++, or C#. If time and money are no object, then you can do this with some effort. But I see questions here in PHP experts-ex all the time about code misunderstandings. If this is a company paid for, then someone should consider gettin  some developer wid PHP experience., they are not hard to find. If the PHP guy has experience in that framework, the time and money (developer hours) saved would be substantial.
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
I am starting to convert from MS to PHP and last year I was supposed to work with Symfony and it was a bit more then I wanted to experience at that time.  After reading up on all that was available, it did seem to be the best thing. The problem was the client really just needed something simple and there was no need for a large framework.  

Now I am playing with Laravel after seeing so many posts from Ray.  I like that it takes care of the crud and routing and there is a large community for support and add ons.  I was able to get going on my windows server with plesk and so far so good.  

If you already have experience in one language, it is just a matter of making your flowchart and wire framing your pages so you know what you want them to do.   I find as long as that is planned out it is just a matter of finding the translation of what you already know how to do.

The circumstances are much different for somebody that has no experience.

Can you list a few bullet points of what the site is supposed to do?  I think you may get more specific advice on going straight php or framework.
Ray PaseurCommented:
@Scott: I think this is the operative quote here:  "... my boss wants me to develop a website in PHP using Symfony or Cake framework."

I teach this stuff for a living and I think your instincts are right on about questioning whether to go framework or not.  If I were the boss I might start differently, perhaps learning PHP to create a simple web site, add a data base and some templates, then step over to the framework.  But I'm not the boss.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.