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.'"

5 of 44 comments (clear)

  1. 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.

  2. 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 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
  3. 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.

  4. 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.