Notes from porting C# code to PHP
moserware.com
moserware.com
Personally, one of the reasons I think PHP will continue to do well is the accessibility which is helped with the basic documentation. Can't remember how something works? php.net/foo. http://php.net/strpos - you get the 'official' docs, along with wiki-ish input from the community about gotchas, workarounds, extra tips, etc. Makes a big difference to many people compared to http://download.oracle.com/javase/7/docs/api/java/lang/Strin..., for example.
As an example Jobserve.com, one of the major search engines for jobs here, has 501 PHP jobs, 1,100 ASP.NET jobs, 2,736 .NET jobs and 1,954 C# jobs (search against UK, Europe and Middle East but most of those will be UK).
Considering the Wordpress numbers I wouldn't be surprised if PHP powers 15% of all sites on the web, perhaps more.
He figures that 15.3% of websites are written in PHP. However, the WP numbers are super low (since these are all huge sites), so I bet that the PHP percentage is somewhere north of 20% overall.
It's tough to estimate that stuff, though, because of all the parked pages that are out there.
Edit: Don't get me wrong though, I completely agree with your 'review'. But you came to the conclusion that php is not that bad... which off course doesn't make it good by exclusion.
Thank you for writing this. I really enjoyed reading it.
PHP 5 is just as object-oriented as Python, Perl or Javascript. Sure, you can have global variables and functions that aren't tied to classes, but you can do that in the CLR too (you just can't write 'em in C#.)
Yes, it has the 'class' keyword, but [it seems] that was bolted on relatively late and wasn't the primary focus in PHP's design.
See the linked article: http://michaelkimsal.com/blog/php-is-not-object-oriented/
I worked with numbers of people who all fawned over PHP5, some going so far as to (ignorantly) say "PHP4 didn't support classes". Of course it did - the class keyword was there, and I'd done a lot of OO work in PHP4 for many years.
Yes, there's more class functionality in PHP5, but it's not on parity with some other languages. AND THAT'S OK.
My beef was/is mostly with the term "object oriented". PHP as a language is not oriented about objects. Your apps can be, to a large extent, but the language is not oriented about objects the same way that Groovy or Ruby or Python is. And it shows.
So.. embrace the function-based nature of PHP's core which allows you to build OO or procedural based on your needs. Just quit saying "PHP is Object Oriented" just because it's "Object Capable".
It was really just a semantic beef I had some time ago, and really would prefer people embrace the things about PHP which make it useful, rather than trying to sell it as something where it comes up short.