Login   Register  
PHP Classes
elePHPant
Icontem

PHP is safe for now

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      PHP Classes blog  >  Is PHP really loosing...  >  All threads  >  PHP is safe for now  >  (Un) Subscribe thread alerts  
Subject:PHP is safe for now
Summary:With the common parlance is the best way to communicate.
Messages:4
Author:Jason Whittle
Date:2011-02-28 19:58:17
Update:2011-03-01 02:50:34
 

  1. PHP is safe for now   Reply   Report abuse  
Picture of Jason Whittle
Jason Whittle
2011-02-28 21:29:39
I know from working in a PHP agency, the developers sitting next to me are increasingly grumbling that Ruby/Python are such nicer languages and if it wasn't for the community support behind PHP they'd switch over in a second.

That said, I don't think it is loosing popularity as it has too much inertia. At the end of the day any given language is an abstraction of the same thing and what makes one better than the other is simply the level of adoption. With the common parlance is the best way to communicate. I don't really see anyone dropping English for German because they think umlauts are really really cool.

However, what could be a game changer is the possibility of websockets and canvas replacing flash. In that case, PHP is a terrible language to use as it has no real support for threading. Seeing JS is actually the most common language adopting this would be very natural, with the weapon of choice having to be either Python or Ruby. In which case, you might see more and more people dropping PHP as they start developing real time web apps in HTML5 just for the sake of consistency.

  2. Re: PHP is safe for now   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2011-02-28 21:55:53 - In reply to message 1 from Jason Whittle
I don't know but I always get the feeling that when people that preach in favor of those languages, it seems they just want snob the majority of developers that use PHP, but in reality they envy the size of PHP market.

It is very easy for an average Joe PHP programmer to get a job. The same could not be said about Python or Ruby. It is not a problem of the language, but rather the fact that PHP became hugely popular, because the Web became hugely popular and PHP was there since its foundation.

As for threading, I think you mean asynchronous I/O, which is a way to have multiple I/O operations going on in parallel. PHP can do asynchronous I/O, it is just not a natural way of for people to program things. Again PHP provides some asynchronous I/O support, although Node.js provides a more mature implementation.

Actually that was a topic discussed in the Lately in JavaScript podcasts some time ago.

http://www.jsclasses.org/blog/post/3-Is-NodeJS-going-to-be-t ...

It was also discussed in the PHP Classes blog

http://www.phpclasses.org/blog/post/133-Accelerate-scripts-r ...

And then in the Lately in PHP podcast episode 6:

http://www.phpclasses.org/blog/post/134-Unusual-Site-Speedup ...

  3. Re: PHP is safe for now   Reply   Report abuse  
Picture of Richard Robertson
Richard Robertson
2011-03-01 02:50:34 - In reply to message 2 from Manuel Lemos
For a guy who does C# and PHP threading has nothing to do with I/O (at least not directly). In this case it means a process running concurrently with the main one - parallel processing in other words. I personally don't see any use for it for a web site. I can do some really terrific things with C# but I can produce working code for PHP much faster. Why? Because PHP lets me be lazy. I don't have to think about data typing to the degree I do with C, C++, or C# (and I was an early adopter of C++). The function library is rich and type reflection is a breeze in comparison. Java? Coding nightmare with all the required declarations and such. No thanks. 30 some odd years programming and when I finally went to learn PHP I was in heaven for a lot of things, especially its arrays. Maybe this all has its share of overhead but I don't care. I can concentrate on the algorithm more and less on how it's really implemented. (I know approximately 20 programming languages -including assembler, machine code, and microcode - and their variations). The nearest language to this ease of use that I've seen was Edinburgh Syntax Prolog.

  4. Re: PHP is safe for now   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2011-03-01 08:34:14 - In reply to message 3 from Marko Tapio Manninen
Right, multi-threading does not have to do with asynchronous I/O. It is just two ways of running multiple operations in parallel. The reason why I said that is what Jason probably was thinking is because he mentioned JavaScript.

Most JavaScript environments do not support multi-threading, but it is common to use asynchronous programming in JavaScript and it usually never blocks waiting for something.