Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


PHP for what...?

I heard building a web app with PHP is not a good idea. What is PHP used for? What can I use it for? Will treehouse teach me PHP? Why not just use Rails?

4 Answers

Philip Cox
Philip Cox
14,818 Points

Hi Tristan. One of the worst things you can do as a new web developer is to listen to all the hype or all of the bad mouthing of other languages. I have done it in the past. PHP is growing and evolving rapidly into a good language. The problem comes from not the language, but the entry level. PHP is easier to pick up than Rails, so there seems to be a lot of new developers learning only the basics of PHP, creating an app or site with base code, and giving PHP a bad name. As mentioned above PHP and Rails have different ways to shine, but as a newer developer I would recommend to ignore the chatter and try PHP. It will offer a good in site into how a back-end language works and pulls data from database. In my personal opinion Ruby/Rails is for a slightly more advanced user with some experience, It takes over a lot of control with it's MVC style structure and requires more setting up on your machine than PHP.

Taking the time to look into PHP and then Rails, or even the other way around if your choose will make you a better developer. Don't stick to one language, never stop learning.


Chris Shaw
Chris Shaw
26,676 Points

Hi Tristan,

PHP is a backend language like Ruby, it allows you to build somewhat of a similar structure you want with extra built-in functionality for MySQL database connects and a lot more.

Team Treehouse have an entire library for PHP. http://teamtreehouse.com/library/topic:php

20,306 Points

Hi Tristan, Where did you hear that using PHP for web apps is not a good idea? It depends a lot on what you want to create with it. PHP (like Chris already said) is a backend language and it is running on a server. It allows you to create great dynamic web applications that can include data usage.

In my opinion, PHP is very good at creating dynamic pages (pages that are being generated 'on the fly' using database or another data source as the source for content). WordPress uses PHP, and it works great, so i don't see why PHP is not a good idea. Using PHP for real time web apps, however, is more problematic as PHP was not designed for it. It may be possible, but probably not the most efficient way.

Dylan Young
Dylan Young
15,752 Points

Depends on your preferences really they are both great each with pros and cons, php is more extensible, incredibly fast, great free community, and easier to learn imo. Most websites worldwide actually use PHP. Also there are great resources to look into on here, and all over the web to learn.