PHP: Hypertext Preprocessor (PHP), was introduced in 1998 by Andi Gutmans, Zeev Suraski and Rasmus Lerdorf (the original PHP/FI creator). In less than 10 years, there are over 20 million internet domains hosted on servers with PHP installed (source: Wiki ). We will talk to our PHP experts to see why they think PHP rocks
Jeff Moore: Cofounder of the WACT project, Jeff is a columnist for PHP Architect. His Blog .
Hasin Hayder: A zend certified Engineer, Hasin maintains the largest PHP user group PHPExperts in Bangladesh. He is a author of "Object Oriented Programming with PHP5", "Smarty PHP Template Programming and Applications" and "Wordpress Complete". His Story Telling
Vidyut Luther: A PHP guy since 1998, Vidyut is currently an independent consultant working primarily with LAMP. He uses his PHPCult as a pulpit to preach to the people who visit his site.
Ed Finkler: a member of the PHP Security Consortium. Ed conceived and built PHPsecinfo to audit the security settings in PHP.INI or PHP environment. Ed works at CERIAS, the Center for Education and Research in Information Assurance and Security at Purdue University. His place.
Matthew Turland: the first PHP 5 Zend Certified Engineer in the state of Louisiana. Very active, in the open source community, he is currently working on a service module for the Zend framework, a Remember the Milk API. His "Web Scraping" article has been been published in PHP Architect Dec 2007 issue. Visit his "I Should be Coding".
Richard Heyes: builds high traffic sites using PHP (LAMP). His high quality code is showcased in PHPGuru, and Yes, they are a free download. He is an active Pear developer.
Martynas Jusevicius: Based in Copenhagen, Martynas, a MSc student, is the author of DIY framework, open-source lightweight web application framework based on object-oriented PHP 5, MySQL, and XSLT. Visit his blog
Q: If you were to start afresh, would you learn PHP again?
Jeff Moore: Yes, I would learn PHP again. PHP has a large base of readily available internet applications. There are open source projects with large support communities and features, such as WordPress and Drupal. There are more CMSes than you can shake a stick at. There are excellent, commercially supported applications such as SugarCRM and vBulletin. Wikipedia is one of the largest sites on the web and its MediaWiki code is freely available for use or for study. Chances are that if there is type of web application that you want to use, someone has already written something in PHP. While you don't need to know PHP to install and use these applications, knowing a bit of PHP allows you to get more out of this valuable resource. Knowing PHP is useful, even if you aren't a full-time PHP programmer.
Hasin Hayder: Yes (probably) - When I will see that Yahoo, facebook and some other big web sites (plus applications) are built on PHP, I will definitely give it a go.
Vidyut Luther: Definitely, but I'd also study more comp sci before I got into programming again.
Ed Finkler: Definitely. PHP is a very powerful, very productive, easy-to-learn language that is well-suited for development of web applications.
Matthew Turland: Most definitely! It's proven such an integral part of my experiences as a developer (hobbyist and professional) that I don't think I could imagine what my general perspective would be like without it.
Richard Heyes: Absolutely. It would be harder naturally, since when I started, shortly before the advent of PHP 4.0.0, since there's a lot lot more to PHP now. But it's by far the predominant language for creating web sites/applications. There are others of course, but they don't have the flexibility or "speed-to-market" that PHP has.
Martynas Jusevicius: I would learn PHP again. But I'm also glad that it wasn't the first language I learned. There many people who start with PHP without knowing the basics of programming and are producing spaghetti code, and who think that building a web app is as simple as throwing some scripts that they found on Google together. I like the object-orientedness of Java and ease of deployment of PHP, so I'm using PHP 5 but trying to make my code look more like Java.
Q: What do you think is the most important feature of the PHP language?
Jeff Moore: There is no one single feature. PHP has a set of features that work well together, they include garbage collection, dynamic typing and a low level of abstraction, which make the language accessible. This accessibility along with cheap and widely available hosting is an important enabler of PHP's open source, community-driven application base. PHP is a special purpose language, so use it for your web front ends, take your other stuff elsewhere. Lacking a deployment or compile stage makes for fast feedback cycles and easy development. A large community means support and documentation. The maturity and size of the PHP community mean that all of PHP's faults are well known and their solutions are as well.
Hasin Hayder: The simplicity of PHP is the most interesting feature I think. What you can do using some elite languages ( for ex, Java) in months, you can do it in PHP in a week.
Vidyut Luther: The community.
Ed Finkler: It's impossible for me to pick a single feature -- the usefulness of a language is usually defined by its full set of features, not one or two. I would probably list these as PHP's most significant features *to me*:
* Ability to embed within HTML docs and tight integration with Apache - "time to productivity" is my shorter because of this
* Very solid out of the box support for MySQL and sqlite, with a variety of other DBs supported
* Powerful, flexible arrays
* The ability to support both procedural and object-oriented approaches well
Matthew Turland: Its duck typing system. Many languages I've worked with, and in fact most of the languages I now work with professionally on a day-to-day basis, are strongly typed. While this does have some advantages, there are capabilities offered by weakly typed languages that can decrease the amount of implementation work required by allowing for higher levels of abstraction.
Richard Heyes: Its ability to integrate with other platforms. Currently you would have a hard job making a decent or large site from PHP alone. It could be done, but it would be wholly unrealistic to assume this is always the case.
Martynas Jusevicius: I don't know if that can be called a feature, but I would say the ease of deployment again. Which resulted in popularity. Other than that, PHP is not really special as a programming language. PHP 5 brought some nice improvements though -- object-oriented model, better XML and database support.
Q. What PHP forums would you recommend?
Jeff Moore: SitePoint and the PHP Dev Network are the only two I visit with regularity.
Hasin Hayder: PHPBuilder and PHPTalk. Also Sitepoint and PHPArchitect forum is quite good.
Vidyut Luther: Google, and php.net, and irc (irc.freenode.net). The mailing list is very good as well. I'd also subscribe to the feeds at planet-php.net
Ed Finkler: I don't read any forums, per se. I do recommend the following resources, though:
Matthew Turland: If the word "forum" is being used as a general term here, I highly recommend the ##php and #phpc channels on the Freenode IRC network. As far as forums go by the traditional internet definition, I can't speak to any in particular, as I rarely have to resort to using them in order to engage in discussions, ask questions, or get feedback on ideas.
Richard Heyes: I don't read any forums due to a lack of time. Though I do read and sometimes post to the php-general list. My view isn't always appreciated by the more "hardcore" people though... :)
Martynas Jusevicius: sitepoint.com I probably. I'm not active in some general PHP forums. I use a local forum and a mail group, as well as those of a specific tool or library, such as Propel ORM or XSLT. I find out a lot of stuff following blogs, and on Google of course.
Q. What book would you recommend to a newbie?
Jeff Moore: The online manual for PHP is pretty good. I don't really pay much attention to newbie PHP books. I'd recommend
- Pro PHP Security,
- Essential PHP Security,
- php|architect's guide to PHP Security.
- PHP in Action
- php|architect's Guide to PHP Design Patterns for more advanced PHP programmers.
I'd also recommend php|architect magazine.
Hasin Hayder: Power PHP Programming for sure. And beside That, PHP Unleashed, Learning PHP5 is very good.
Vidyut Luther: All the books from Dale Carnegie, most programmers need serious help with their social skills, and need to understand that they live in a symbiotic world, they need the marketing droids, and the sales folks. From a technical aspect: Object Oriented Thought Process, Mythical Man Month
Ed Finkler:
- PHP and MySQL Web Development by Luke Welling and Laura Thomson
- Essential PHP Security by Chris Shiflett
- PHP5 In Practice by Elliot White III and Jonathan Eisenhamer
Matthew Turland: None, actually. The only books that might be valuable to a PHP beginner only apply if that person has had previous experience with a particular language and the book is specifically targeted at such a person. The online PHP manual is the best existing reference available for a beginner. PHP books that are worth their weight generally deal with applying PHP to a specific application domain and are targeted at intermediate to advanced users.
Richard Heyes: I don't read now due to my sight being rather poor, but I used to read the O'Reilly books a fair amount. That and the certification books (which will take a more technical approach I think).
Martynas Jusevicius: To be honest, I can't remember I would be reading a book specific to PHP.
Q. Name a programming language that you would like to learn? (if you had the time & resources, of course)
Jeff Moore: I'd like to learn one of the functional languages, not for commercial reasons, but to broaden my education.
Hasin Hayder: Python
Vidyut Luther: c#/.net stuff.
Ed Finkler: Probably Python, although I'm also curious about Objective-C, Ruby, Actionscript and Erlang. 8)
Matthew Turland: At the moment, I have my eyes on Lua. My interests do tend to vary, though. I have also in the past had an interest in learning Ruby and C#. Let me know if you have any other questions or need me to expound further upon the answers above.
Richard Heyes: Well, I've tried to learn quite a few so I'll summarise:
C - Not enough time by far
C++ - Ditto
C# - Nice, but since there's a Microsoft lilt I forewent it
Perl - Too obscure and a very steep (IMO) learning curve
Python - Looks very nice but not exactly popular compared to PHP
Ruby - Too obscure
And databases:
PostgreSQL - Nice, but I already knew MySQL quite well. Plus MySQL seemed much easier to work with day to day
SQLite - Useful, but not to me since I have access to MySQL.
I've tried a fair few, but always continue with PHP due to it's ease of use and its versatility. Plus I can do everything I want to with PHP, so I've now got no reason to learn anything else. HTH
Martynas Jusevicius: Not Ruby, so far I'm doing ok without it. I think Erlang, they say concurrent programming is going to be big. And I should get back to XQuery some time again.
I thank the panel for sharing their views and I hope this helps you understand why PHP is, where it is.
This is part of the "What Makes a Programming Language Popular" series where we compare Perl, PHP, Python and Ruby. See
Introductory programming language book sales indicate the amount of interest in adoption. Note that I have stressed the word interest. Comparing the introductory level books for Php, Perl, Python and Ruby will tell us how well the advocacy efforts of each language is doing to generate interest in that language.
Intermediate to Advanced level book sales indicates the retention of that interest.
Tracking book sales as an indicator of the market, has been used by Mike Hendrickson of O'Reilly in State of the Computer Book Market.
My interest in comparing book sales is to compare the adoption and retention interest of each language. You can check Antonio's Comparison of programming languages for more languages and how they fare in terms of book sales.
Unlike, O'Reilly, I do not have access to BookScan data, so I went with Amazon.com's sales rank. Amazon also has the feature to list books by programming language and by levels (Introductory, Intermediate-Advanced). Since Amazon.com's Sales Rank is not linear but a log scale, I used an estimator function to translate the sales rank to predict volumes sold. (This function holds well but at very low ranks, less than 10, this function over predicts. We wont have a problem as no programming language book will have a sales rank that high.)
Predicted Sales Volume per Year = 10080 * EXP(-2.4629 * LOG10(Amazon Sales Rank))*365
NOTE TO READERS: The Methodology I used to Predict is inherently flawed as I had captured the sales rank at one point of time and tried extrapolating it to annual sales. Authors like brian (Learning Perl) pointed out this flaw as they had the actual book sales data. So until I track sales ranks over a longer period of time and check to make sure that the predicted volume approximates actual sales, I am removing the estimated book sales data and the sales rank. I am leaving behind the list of books that were the top 5 in Amazon in each category.
Php Introductory Book Sales
| Perl Introductory Book Sales
|
| Name | Beginning Php and Mysql5
| Php5/Mysql Programming
|
| | Name | Learning Perl 4ed
| Beginning Perl 2ed
|
|
Python Introductory Book Sales
| Ruby Introductory Book Sales
|
| Name | Python Programming: Intro to CS
| Python Programming for Absolute Beginner
|
| | Name | Ruby Programming for Absolute Beginner
|
|
I used the same methodology for Intermediate to Advanced level. Here, there was a better choice of books for all the languages.
PHP Intermediate/Advanced Book Sales
| Perl Intermediate/Advanced Book Sales
|
| Name | Programming PHP
| | PHP and MySQL for Dynamic Web Sites: | | PHP Solutions: Dynamic Web Design Made Easy | PHP 5 Objects, Patterns, and Practice
| PHP Cookbook
|
| | Name | Learning Perl 4ed
| Programming Perl 3ed
| Perl Cookbook
|
|
Python Intermediate/Advanced Book Sales
| Ruby Intermediate/Advanced Book Sales
|
| Name | Learning Python
| | Python in a Nutshell | Programming Python
| Python Cookbook
| Core Python Programming
|
| | Name | Agile Web Development with Rails
| Programming Ruby: Pragmatic Programmmer Guide
| Railspace: Building a Social Network
| Ruby Cookbook
| Ajax on Rails
|
|
This is part of the "What Makes a Programming Language Popular" series where we compare Perl, PHP, Python and Ruby. See
Language popularity is dependent on support resources like forums, groups and blogs. When we analyze the popularity of a language, we need to compare the support resources for each language.
Everyone of us, from a newbie to an experienced hack, have run into road blocks time and again and have turned to these support resources for solutions and pointers. The support structure for each language plays a critical role in making it easy to adopt a language and to increase its popularity with an increasing user base.
So, how does Perl, Php, Python and Ruby compare in terms of support resources?
The first comparison we make is the general term visibility in each search engine.
Term Visibility
This gives an idea as to the number of sites out there that at least mentions the language. Granted, this is a very poor way to compare the number of sites devoted to each language but due to a lack of my imagination, I am going to use this for a very gross comparison. The TIOBE Programming index uses +"<language> programming" as a way to calculate the popularity of a language. Instead of using the phrase, we will use <language> AND programming as I think this is a less restrictive way of finding sites devoted to a language and is good at eliminating noise (as much as possible).

| Sites from Each Search Engine in Thousands
| | Google | Yahoo | MSN | Normalized | | PHP | 104 | 66.2 | 105 | 1 | | Perl | 48.2 | 30.5 | 42.5 | 0.46 | | Python | 44.1 | 24.1 | 15.5 | 0.39 | | Ruby | 33.1 | 22.5 | 23.2 | 0.32 |
|
The normalized column is a weighted normalization using search engine market share, Google: 63%, Yahoo 32% and Msn 5%.
For every 100 sites for PHP, there are 46 sites for Perl, 39 sites for Python and 32 sites for Ruby.
Usergroups that Meet in Person
Usergroups that meet in person provides an excellent opportunity for anyone interested in that language to learn from the experts. The number of usergroups also indicate the motivation and dedication of the user base. This is a definite indicator of the popularity of that language. We compared the officially listed usergroups that is located in North America (US, Canada and Mexico). We used the number of user groups listed in PerlMongers, Python.org, RubyGarden.org and PhpUserGroups.org .
 | User Group Comparison
|
My 2 cents: Come on Python enthusiasts, you need to do better if you need to grow Python's popularity.
Most Popular Forums
We compared the membership numbers in the most popular online forums to get an idea of the size of the user base for each of the language. The membership is of course not restricted to the U.S and like the term visibility is a rough indicator of the size of the user base.
Popular Perl forums
Popular Php Forums
Popular Python Forums
| comp.lang.python | 11433 registered members
|
| tek-tips | 2046
|
Popular Ruby Forums
Usenet group, comp.lang is the common forum across Perl, Php, Python and Ruby, so it makes sense to compare the memberships of the usenet group.
This is part of the "What Makes a Programming Language Popular" series where we compare Perl, PHP, Python and Ruby. See
Current Availability of Perl, Php, Python and Ruby Programmers
Companies choose a programming language for many reasons, but one of the top ones would be the availability of developers in that language. You don't want to start a development project with a language and realize that there are only a handful of people out there, who know that language.
Availability of experienced and talented developers is a key requirement of corporate adoption and retention of a programming language.( see Corporate Popularity What Makes a Programming Language Popular )
How do we estimate the number of programmers experienced in each language?.
Rather than absolute numbers, it would be sufficient to compare the relative numbers of developers experienced in a particular language from a large sample of developers. This ratio estimate will more or less hold good in the general population.
To get an unbiased, large sample, we turned to the top 3 search engines, Google, Yahoo and MSN to find the number of resumes on the web with a particular skill. The hypothesis is that the likelihood that a Perl programmer will put his/her resume online is the same as that of a Php programmer, so on and so forth.
The query we used to find resumes is
(intitle:resume OR inurl:resume) LanguageName -intitle:jobs -resumes -apply
in the three search engines.
 | Observations: In Google Php results are about 6 times more than the next skill, Perl. Where as in Yahoo the results between Php and Perl were nearly similar. MSN showed Php to be 5 times that of Perl. What this tells us is that there is a large variation between the relative number of resumes for each skill in each search engine. Resumes in Search Engines
| | Google | Yahoo
| MSN
| | Perl | 170 | 247 | 75.1 | | Python | 54.2 | 68 | 23.9 | | Ruby | 34.1 | 19.2 | 11.5 | | Php | 1050 | 274 | 375 |
|
As seen above, there is a wide variation in the raw numbers from each of the search engines. We need a normalized set of numbers that can say that for every 100 php programmers, there are 40 Perl programmer, 20 Python and 10 Ruby programmers, or something like that.
The first thing we did is to normalize the skills in each search engine. Then we assumed the relative market share of the search engine (totally arbitrary, needed a weighting factor of the search engines) and computed relative numbers. The relative market share of Google vs Yahoo vs MSN is about 44:29:13. To those, who have a keen eye, the market share of the three search engines come only to 86 and not 100. We scaled the search engine weighting numbers so that we had 100.
 | Resumes in Search Engine - Normalized | | Google | Yahoo
| Msn
| Combined | | Perl | 0.16 | 0.9 | 0.2 | 0.42 | | Python | 0.05 | 0.25 | 0.06 | 0.12 | | Ruby | 0.03 | 0.07 | 0.03 | 0.04 | | PHP | 1 | 1 | 1 | 1 |
|
Conclusion: The combined search engine column estimates that for every 100 PHP developers, there are 42 Perl developers, there are 12 Python developers and 4 Ruby developers.
This is part of the "What Makes a Programming Language Popular" series where we compare Perl, PHP, Python and Ruby. See