PHP Shortfalls
Been reading up a lot on PHP, Ruby and various other web languages recently.
PHP cops a lot of flack. Â This is one very good article of PHP’s shortcomings, and touches on one things I really really hate.
That is inconsistant API naming.
The one that gets me is is_null and isset. To me they feel similar, one checks if the value is null, the other if it exists at all.  I force PHP to be strict which means I can’t reference variables that are not set (highly, highly recommended, and has caught many bugs) so am using isset everywhere.  But I always forget which one has the underscore, and frequently have to look it up (as I did just now).  To make it worse, some functions are camelCase’d too…
I’m glad PHP has the strict option at least. But I prefer being forced to declare variables. Â Nothing like finding a typo in one of your variable names after 1 hour of debugging :-/
On scalability, it’s easy to think Facebook (PHP) scaled, where as Twitter (RoR) did not.  But when you drill it down, maybe it’s not the case.  Facebook has 30,000 servers, which that article I linked calculated to mean each services only 128 visits (multiple requests) per hour.  And I have found many references for Twitter where it seems to be squarely their fault (and maybe using Ruby in places that are not so suitable).  So maybe Facebook just planned for growth and scaled up better.
