Slashdot Mirror


PHP Becoming More Popular

IO ERROR pastes "'PHP has earned the title "Programming Language of the Year 2004" with a positive delta of more than 3 percent within 1 year. The launch of PHP version 5 is generally regarded as a further step to maturity. It is expected that PHP will be capable to maintain its top 4 position for a long time,' according to the TIOBE Programming Community Index. 'The index is updated once a month. The ratings are based on the world-wide availability of skilled engineers, courses and third party vendors.'"

44 comments

  1. SkillMarket disagrees... by mshiltonj · · Score: 4, Informative

    According to the data on my SkillMarket site, php (on the languages page) is holding steady. The data tracked is a bit different, however (Job listings vs search engines hits).

    1. Re:SkillMarket disagrees... by Anonymous Coward · · Score: 0

      Guido? Guido? Is that you?

    2. Re:SkillMarket disagrees... by Anonymous Coward · · Score: 0

      The SkillMarket data is probably a more accurate representation. PHP is usually used with a database backend, so most things that use PHP probably also require SQL. SQL is definitely used for a lot of projects that don't involve PHP. Yet in the article, PHP is considered more common than SQL.

      Another interesting point is the popularity ranking of C versus C++ and JAVA. In the article, C is considered the most popular. This may very well be true for projects that are posted to the internet. Except for parts of the embedded system world, most professional projects in a general purpose language are done in C++, JAVA, or C#. I think that this may be due to an occasional attitude problem with the free software crowd. Specifically, there is a tendency to use lower level languages than are necessary. C++ has only recently seemed acceptable for FOSS projects.

  2. About the other changes by A+beautiful+mind · · Score: 1, Offtopic

    I have to say im happy about java going down, but about perl, i feel quite the opposite. mod_perl is still the best tool for me - thanks to the flexibility - not php.

    --
    It takes a man to suffer ignorance and smile
    Be yourself no matter what they say
    1. Re:About the other changes by Anonymous Coward · · Score: 0

      I do both and like php a lot more, for http stuff. I guess for flexibility use perl. For productivity use PHP. To each his own.

  3. It is not surprising... by downward+dog · · Score: 4, Insightful

    ...that PHP is becoming more popular. It is fast, can be developed quickly, uses familiar C style syntax, and was designed from the ground up to be a web language (unlike Perl et al). For about 90% of web applications, PHP is perfect.

    What is surprising to me is that PHP has a rating of 9.5%, while Perl has a rating of 7.4% (declining).

    1. Re:It is not surprising... by Anonymous Coward · · Score: 0

      Of course it is becoming more popular, now that every dumbass can write his own open-in-the-back website to provide script kiddies a computer to play with.
      You know I'm right, C language buffer overflows are in first position

  4. Follow-up by downward+dog · · Score: 2, Insightful

    Looking at SkillMarket, there are far more Perl jobs than PHP (2629 vs 312). Why the discrepancy between SkillMarket and TIOBE?

    From TIOBE's ratings explanation:
    The ratings are based on the world-wide availability of skilled engineers, courses and third party vendors.

    It could be:
    1. That PHP is more popular outside of the US (and SkillMarket only tracks US jobs).
    2. That PHP generates approximately the same number of courses, books, etc. than Perl does. After all, if there are 9x as many Perl jobs as there are PHP jobs, that doesn't mean that there would be 9x as many Perl books or courses as there are PHP books or courses.
    3. Perhaps PHP has more of a following among amateurs - hobbyists who build web applications, but don't hold jobs as PHP programmers.

    1. Re:Follow-up by Anonymous Coward · · Score: 0, Informative

      PHP is easier to learn than perl, so more newbs are using it. That explains a lot of it. You know, considering all of the hacks out there that have been launched against PHP (even due to problems in the core of PHP itself), I would never consider using it for an important part of business.

      PHP just feels too... play-skool for me. PHP is like blogger. If you don't have the ability to figure out how to install or make your own CMS, you create an ccount at blogger. Likewise, if you don't have the skill to learn and write code that can do something without having it handed to you on a platter ala Apple style, you use PHP.

      Not to mention, PHP still just feels totally undeveloped. I gave up after figuring out how to seperate everything from the presentation. PHP likes to integrate things a bit too much... also, their postgresql interopability is very limited. If they had much better postgres support, I **MIGHT** consider it with more weight.

    2. Re:Follow-up by Saeed+al-Sahaf · · Score: 4, Insightful
      Looking at SkillMarket, there are far more Perl jobs than PHP (2629 vs 312). Why the discrepancy between SkillMarket and TIOBE?

      Because while Perl has been in widespread use professionally for a log long time ("Perl is dieing, Netcraft confirms it..."), and so there are a large number of IT professionals that use Perl, PHP has only recently been taken seriously by enterprise class developers, and so has not yet built the volume of qualified professionals yet. It's that simple, no mysteries, no misinterpretations, nothing to see, move along.

      --
      "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    3. Re:Follow-up by afd8856 · · Score: 1

      What's wrong with easy to use tools? I think in business pragmatism wins. Most of the time you have to choose between the easiest/faster to develop to use tool and the right tool.

      Let's suppose that there are two start-up businesses with the same idea. Who's gonna win in the long term? The one that will offer services a year before the other or the one that has a better platform (that may not translate into better services for customers), but will start offering its products a year later?

      Having said that, I, as an independent programmer believe that PHP is not the right tool and if you choose Python+Zope+Plone, it may not be the faster development tool either.

      --
      I'll do the stupid thing first and then you shy people follow...
    4. Re:Follow-up by Anonymous Coward · · Score: 0

      "...If they had much better postgres support, I **MIGHT** consider it..."

      Well, what do you need in PHP that can't be done better using PostgreSQL's advanced features such as views and stored procedures? IMHO PostgreSQL is a better match for PHP than MySQL - unless you _really_ want to put all those SQL statements in your scripts ...

    5. Re:Follow-up by bobbyjack · · Score: 3, Interesting

      What's with this perception that PHP is 'easy' somehow? Can somebody explain in what way it is 'easy'? The syntax (as has already been pointed out) is very similar to C, the concept of functional (or OO) programming still needs to be learnt, a web programmer still needs to understand http, sessions, cookies, etc. when using it.
      Are you talking about ease of installation? Why argue about /that/?
      Are you talking about the fact that it's weakly-typed and variables do not need to be declared before use? Plenty of other languages follow suit.
      Is there a problem with the fact that you can't do everything in 18 different ways and, thus, end up with a complex (i.e. not 'easy') mess that no-one else can maintain?
      Or is it just that PHP provides a very simple way of developing a huge range of medium-scale applications with built-in features to manage http, cookies, sessions, etc.? Sure, people can do damage if they don't understand the language, but that's nothing new. I suppose some huge percentage of PHP 'programmers' lack knowledge of some key concepts of the language, but I'll warrant that percentage is not much greater than the corresponding ratio of c, java, perl programmers.
      Seriously, have any of you who claim PHP is 'easy' every done any serious programming with it? And can you just explain what you mean?
      For the record, the way PHP handles certain array-based structures and, especially, the way it handles pointers/references is, IMHO, far more complicated than equivalents in Java/C.

    6. Re:Follow-up by Anonymous Coward · · Score: 0
      Perl has been in widespread use professionally for a log long time

      That must be why a graph of its increase in popularity over time is levelling off ;)

  5. "Positive Delta" ?!?! by zaqattack911 · · Score: 2, Insightful

    cmon man... just cuz you're a slashdottin' geek, does it mean you're not allowed to use normal english?

    1. Re:"Positive Delta" ?!?! by squidfood · · Score: 2, Funny
      just cuz you're a slashdottin' geek...

      ok. [ dPHP/dt ] / [PHP(2003)] = +0.03

  6. A More Telling Number . . . by Dausha · · Score: 1

    If you look at the hierarchy, you'll see that Perl dropped by 2.14 percent. Python rose by 1.7 percent. This is not a perfect mirror, but it does hint that Python may be sapping a bit of Perl's strength. However, it is just as likely that some of PHP's gains were also at Perl's expense.

    What's weak about my analysis is it assumes that a developer only showcases one skill, which is not the case. That is, this needn't be a zero-sum game.

    Although, I speculate some of the Perl decline is due to PHP's ascendency in the web world and some is due to the Perl6 due to come out. All I read keeps promising that Perl is making a radical change. As a former Perl developer, I know that affects my decision on what language I'll focus on learning in the future.

    --
    What those who want activist courts fear is rule by the people.
  7. popularity does not mean YOU should use it by Anonymous Coward · · Score: 0

    If you're just starting to develop web sites and you're reading this article, you better ask yourself.. do you want to shoot for the bottom 90% or the top 10%?

    Do you want to use the "popular" language? Think about what else is "popular" in the computer world.. Windows? IE? Bad web design? Bad coding?

    I know, for some simple things like adding today's date to a web site, PHP isn't any different than anything else. But do you want to use a language that can't grow with you?

    I'm just saying, look what's available FIRST. Check out a few environments and languages. THEN decide if you really want PHP because everybody else is using it.

    And no matter what you use, please html-escape all your output and verify all your input.. please!!! I'm amazed that html-escaping all output by default still isn't available in 99% of frameworks.

  8. Python Servlet Engine is the answer! by docwhat · · Score: 1

    Sick of the problems with PHP? Badly implimented APIs, web pages with ugly code buried everyplace doing things that it should be?

    Try PSE! It cures warts, common colds and PHP!

    http://nick.borko.org/pse/

    Ciao!

    --
    The Doctor What (KF6VNC)
    1. Re:Python Servlet Engine is the answer! by profet · · Score: 2, Informative
      Sick of the problems with PHP? Badly implimented APIs, web pages with ugly code buried everyplace doing things that it should be?

      Try PSE! It cures warts, common colds and PHP!

      http://nick.borko.org/pse/

      Ciao!


      Oh come on... If you are witing ugly PHP code then you don't know the language.

      Have a JAVA/.NET developer look at PHP5 and they'll tell you how it exudes enterprise level features.

      Add Smarty and PEAR to the mix and you have one hell of a platform.
    2. Re:Python Servlet Engine is the answer! by docwhat · · Score: 1

      Oh come on... If you are witing ugly PHP code then you don't know the language.

      Heh, that doesn't really change the argument, does it? PHP I've seen is either: mine or someone else's (or a combination). Mine might be pretty enough, but the vast majority of the code I've seen must have been by people who didn't know the language. Or didn't know how to maintain PHP. Or both.

      --
      The Doctor What (KF6VNC)
    3. Re:Python Servlet Engine is the answer! by Anonymous Coward · · Score: 0
      Add Smarty and PEAR to the mix and you have one hell of a platform.

      I wholeheartedly agree. One hell of a platform indeed.

      PEAR is actually generally quite well-implemented (something I could never say about PHP itself) but Smarty is, to put it lightly, a horrible templating engine. For really simple tasks, it does the job, but when the complexity of the material you are trying to present increases, you eventually will have to take large parts of you presentation code to the PHP side or use huge chunks of inlined PHP code.

      Not to even talk about the horrors of trying to output cleanly indented HTML or the numbing braindamage of Smarty when it comes to different encodings.

  9. What makes it "easy" by Dr.Dubious+DDQ · · Score: 2, Interesting

    To me, it seems like PHP strikes a good balance between the strengths and weaknesses. It's got much of the same sort of flexibility and text-handling capability that Perl does, but not so much so that it suffers from the same degree of wild variability that Perl is accused of having.

    The "C-like" syntax makes PHP very similar in style to a variety of other programming languages (C, C++, Java, etc.), so it will seem at least somewhat familiar to people who have programmed a bit in other languages.

    PHP has support for "object-oriented" programming style, without actually REQUIRING it (unlike, say, Java [or Python?]), so both OO and procedural programmers can feel somewhat comfortable with it.

    PHP has a lot of built-in functionality to simplify dealing with connections over the network, e.g. to web servers, ftp servers, database servers, etc. - this and text handling are PHP's two biggest strengths in my opinion. Note that in my own experience I've found the PHP is useful for a lot of the sort of non-web-based "command line" administrative tasks that traditionally have been handled by Perl.

    Or in summary - PHP is a nice "middle-of-the-road" sort of language. It's not the "best" language for very many programming styles, but it IS "pretty good" for a lot of them, so regardless of one's own preferred style PHP will usually not be completely uncomfortable.

    My own, possibly misguided opinion, obviously...

    1. Re:What makes it "easy" by bobbyjack · · Score: 1

      I haven't used command-line PHP much, but agree with most of your points. They were the sort of points I was trying to make, albeit expressed in a slightly more straightforward way ;-) I get sick and tired of assumptions that anything is "easy" and that, if something /is/, it must not be worth using. PHP is merely different, and, as a programming language is better suited to some tasks than any other, and less suited to a whole lot of tasks than some languages.
      It's always been that way, get used to it. (that's not aimed at you, Dr.!)

    2. Re:What makes it "easy" by Adian · · Score: 2, Interesting

      I totally agree with the above posts. As a person who has used PHP since it was in the 2.* versions, I have went from the newb programmer to someone who writes complex applications. PHP I believe has facilitated my ability to understand procedural versus object-oriented approaches (regardless of the opinions of its broken OO model).
      As someone who started with C, then moved to Perl, I found PHP's syntax very understandable and quite managable. Now that I've been learning Java, and seeing PHP5's movement in the Object-Orientation arena, there are extreme similarities in PHP's migration toward better Object-orientation. As mentioned above, I too have replaced many of my perl scripts with command-line PHP scripts, which is pretty handy.
      One must also consider that ANYONE can write crappy code, with ANY language. Any inexperienced programmer can destroy data just as easily with C, Java, Perl, and others, as one can with PHP. I think because of PHP's friendly syntax and functions it tends to attract more inexperienced programmers. But, everyone has to learn somehow, and I view programming as a creative outlet similiar to playing music. I'd rather someone create something they consider useful, than be frustrated because they have a lame compile error that they can't solve for 6 hours, and ultimately have a negative programming experience.
      I think every language has strong and weak points, and as posted above PHP is not the end all of programming languages. I think it's in the programmer's personal interest to have a wide span of knowledge and tools to be able to evaluate which language would best be suited for individual projects. I look forward to many years of PHP development. I appreciate the developers that have worked so hard to make it such a usable language.

      --
      Adian
  10. I'm not surprised ... by straybullets · · Score: 1
    Like all Aspect Oriented languages, PHP is a tool for the future ...

    (it's a joke,damnit !)

    --
    With that aggravating beauty, Lulu Walls.
  11. Yes but... by downward+dog · · Score: 1

    ...those are all examples of things that are popular among non-experts. They are popular in popular culture, not with people who know much about computers, music, politics, film, or science.

    With PHP, it's a different story. It's not that my wife (non-expert) thinks that PHP is hip and Python is lame. It's that I (expert, used loosly at least) think that PHP is a great way to develop a simple web application.

    But you're right, that Fockers movie was f-ing _terrible_.

    1. Re:Yes but... by Anonymous Coward · · Score: 2, Interesting
      With PHP, it's a different story. It's not that my wife (non-expert) thinks that PHP is hip and Python is lame. It's that I (expert, used loosly at least) think that PHP is a great way to develop a simple web application.

      You have to use a different scale of "expertise" here - there is a _huge_ difference between the average self-proclaimed "PHP consultant" and someone who actually knows something about (web-)programming.

      I'm about finished with a several-month project that I had to do in PHP for the sole reason that it was the only language used in the servers, and I've been constantly amazed by the horrible design of the language.

      Judging from the posts on USENET and several PHP-related forums, it seems that the average PHP user has no clue, and uses PHP because he has no idea of anything else even existing. That's why the grandparent comparing PHP to Windows et al. is quite right.

  12. Cuanto me buscan no estoy by RAMMS+EIN · · Score: 2, Insightful

    Heh, PHP is rising in popularity, just as I'm moving away from it. Seems I still manage to avoid the mainstream languages. :-) Or maybe it's just that I know more now than 5 years ago...

    Seriously, when I first learned PHP, I thought it was the best. Here's a language specifically intended for web development, with familiar syntax and function names, and support for everything you might need.

    These days, I think PHP is an inflexible language, full of kludges to make up for it. I've grown to dislike C syntax, and I also feel the typical (in PHP) mixing of PHP and HTML is bad (what if you want to generate a different output format?).

    Also, I have learned that good general purpose languages can often be used instead of a given special purpose language. About the only requirement is that the language be flexible enough, and has the needed libraries. There are several languages that fit the bill for web development (Ruby, Python, Common Lisp, Perl, ...)

    --
    Please correct me if I got my facts wrong.
    1. Re:Cuanto me buscan no estoy by ^Case^ · · Score: 1

      I also feel the typical (in PHP) mixing of PHP and HTML is bad (what if you want to generate a different output format?).

      It is bad! You do not have to mix in emotion. It is a plain fact as soon as you move beyond the simplest applications.

      But that is not the fault of the language, even though PHP more than other languages may encourage this behaviour. You can mix things that should not be mixed in any language.

      You can make your application just as loosely coupled in PHP as you can in most other programming languages.

      Not to say that PHP does not have shortcomings compared to others. Yes, Python and Ruby does have capabilites far surpassing those of PHP. But PHP also have strengths compared to Python and Ruby I believe. So use whatever lets you express your ideas easily (both for you and your readers) and concisely.

      In the end what matters is the final result.
    2. Re:Cuanto me buscan no estoy by voisine · · Score: 1

      Why would you mix your business logic with your layout just because you're using PHP? If you do you've got no one to blame but yourself. How is this the fault of the language? Just because you can do something doesn't mean it's recomended. I wrote a php templating system if 5 lines of code:

      function include_tpl($file, $vars = array())
      {
      extract($vars);
      include($file);
      }

      there. done. Now you put all your layout in php files maked template and your business logic php code can just include the templates by calling the above function.

    3. Re:Cuanto me buscan no estoy by docwhat · · Score: 1

      That is one of the best suggested ways to use PHP I have EVER heard of. That is truely a good tip.

      Ciao!

      --
      The Doctor What (KF6VNC)
    4. Re:Cuanto me buscan no estoy by Tablizer · · Score: 1

      mixing of PHP and HTML is bad (what if you want to generate a different output format?).

      How often does this happen[1]? To make GUI paradigms truly swappable and test that they are swappable is a hell of a lot of work, and can add to a lot of annoying indirection in the code. Also note that HTML is an interface, not an implementation. I agree that details of implementation should be wrapped, but wrapping one high-level interface (HTML) with another is perhaps a waste of time and code.

      [1] In finance, costs several years down the road are discounted over time. Thus, to spend 10 units of time to prevent 15 units of time 8 years from now is not worth it under future discounting. I generally have to agree with the rationale behind future discounting.

    5. Re:Cuanto me buscan no estoy by Anonymous Coward · · Score: 0

      >Yes, Python and Ruby does have capabilites far surpassing those of PHP

      name one...
      In all honesty, I have never hit a barrier with php. Are you installing your programming languages with rpms or running php on windows? Tisk Tisk... Compile php from source and any barriers you think you have, will evaporate. Yea it's a little difficult at first, but who wants to run php on a xeon compiled for 386? After you do it 10 times it becomes very easy. Plus you can use any extensions you want, not just what the packagers felt like putting in.

      >But that is not the fault of the language, even though PHP more than other languages may encourage this behaviour.

      Context switching all over the place? weak. no one encourages over use of this. In fact, over use of script/html context switching is a problem in *all* languages. It's the programmer, not the language who is at fault. You only have limited header control and bucu cpu cycle wastage. You should have one echo statement, done to echo out your entire page in one shot.

      It's impossible to send proper cache control headers any other way. You can't get a size for the content, and generate an e-tag til it's rendered and in a variable you can measure ; ) If you are switching to php all over the place in your HTML, or switching to html all over the place in your php you are also wasting cycles whenever you go from one to the other..

    6. Re:Cuanto me buscan no estoy by Anonymous Coward · · Score: 0

      >Also note that HTML is an interface, not an implementation

      You are scaring me. HTML is a document markup language. HyperText Markup Language. It's not an interface.

    7. Re:Cuanto me buscan no estoy by Tablizer · · Score: 1

      You are scaring me. HTML is a document markup language. HyperText Markup Language. It's not an interface.

      Either way, it is NOT an implementation. Browsers implement it.

  13. PHP is great for what it is by yetdog · · Score: 2, Interesting

    I believe that PHP should be taken for what it was meant to be: a flexible web language. Yeah, it can also do some command line scripting, and it can be quite good at it. But just by browsing through php.net and looking at the built-in functions, you can see that it's obviously geared towards web use first and foremost. My website uses PHP exclusively, and we've been able to do some pretty amazingly interactive stuff with it, in combination with MySQL.

    1. Re:PHP is great for what it is by Anonymous Coward · · Score: 0

      When did php start using Jasascript code? Or maybe exclusively doesnt mean what it used to. But I do think that php is great at what it does. It has lots of libraries, easy learning style, but to me the most important thing that php brings to the table is its Documentation. The way php.net it setup. I think if more projects were setup this way we would have less people asking questions about how to do simple coding problems.

  14. Full of it by Anonymous Coward · · Score: 0

    Man, I think that this company is completely crap. They use google, yahoo and msn search to determine which programming language is most prominent. Is that the best market research one could think of? So what kind of queries do these guys use in order to assess language presence, engineer availability and courses? The explanation on the company's page is *extremely* vague, the results should thus be taken with a huge grain of salt.

    Secondly, why have they chosen PHP to be the language of 2004? Has anyone seen those trend graphs? There's quite a lot of variance, so I wouldn't bet any money on PHP holding position at #4, it has just popped above basic and perl, but that could change all again next month. When I'm looking at that graph I would say that java is definitely the loser of the year, losing an amazing amount of presence in comparison with others. But the number uno programming language in their study just must be C, climbing the given rating better than any other language in 2004.

    But, as I said, I can't give any credit to these guys' methods, so I don't believe any of these trends and results either.

    Heh I just noticed these manager-ass-licking no-nos work on the same campus as where I'm working.

  15. 7 Month Itch by Arjuna · · Score: 1

    Every now and then I get a (7 month?) itch to have a closer look at PHP, usually something turns me right off it, like the following:

    PHP in contrast to Perl
    Python vs PHP

    Unless a special purpose language has really good reasons putting it head and shoulders above a general purpose language for a given task, I'll go the general purpose route. I have yet to see the reasons for using PHP stack up to more than 'it handles sessions etc for you' and 'its what every web host offers'. That may be reason enough for some for sure.

    I've set up the odd PHP command-line app to do things other than munge web pages, and found that for anything longrunning, you have to edit or override a setting in php.ini that specifies the HTTP timeout, so it won't timeout your PHP system daemon/batch job processor. Aside from the rest, somehow that tells me everying other than 'web monkeywrench' was an afterthought.

    1. Re:7 Month Itch by Anonymous Coward · · Score: 0

      not true on the php.ini statement. just put this at the beginning of your job.

      set_time_limit(0);

      i have a job that has run for over a year with no problems.

  16. Python and Delphi by Anonymous Coward · · Score: 0

    The graph shows that, since Dec 01, Python and Delphi have varied in popularity, but have been almost the same as each other - sharing a big increase in 2004, and the same small fluctuations over the last 5 data points.

    Amazing coincidence? Or dodgy data?