Nitobi
About Nitobi
Services
Products
Home -> Blogs -> Alexei@Nitobi

Alexei@Nitobi

Love/hate with PHP

August 26th, 2007

I’ve been an on-again, off-again fan of PHP over the years. On the balance I AM a fan, but some things about it really grind my gears.

  • Upgrading. Upgrading is always a nightmare. Things never really work out right away. Always budget like 2 hours to upgrade PHP, especially if you are using IIS or MySQL. Expect to trawl the forums if you are a new or intermediate user.
  • Bugs. I’m tired of the shoddy Q/A that seems to go into production PHP releases. Its issues like this that waste time and make me wonder why I bother (Check out the recommended solution: downgrade to 5.x.x).
  • Reinventing the wheel. I have to use a lot of scripting frameworks in my line of work (Ruby, .NET, JavaScript, ActionScript, ASP, PHP, JSP, etc etc). What strikes me is that a lot of the frameworks do a lot of things the same way, like the order of arguments for common functions like strlen, strpos, etc. Except php! Its always different with PHP.. it always seems to be some different convention that nobody else uses – go figure.
  • Inconsistent API. I know PHP has been a work in progress, but there have been plenty of opportunities to standardize naming conventions. Eg: String replace versus string position (str_ireplace, stripos).
  • Colloquial documentation. I sincerely hope you are a native north american english speaker when reading PHP docs. Actually, stripos is a great example of what I’m talking about – check out the argument names:

    int stripos ( string $haystack, string $needle [, int $offset] )

    Really cute, not very helpful.

I’ve been doing a lot of Ruby coding lately and I REALLY like a lot about that language.. especially how everything in Ruby is an object. I really wish PHP would adopt some of the lexicon of Ruby, or at least head in that direction. Also.. a console for testing out code would help development substantially (a la ‘ruby script/console’).

| Del.icio.us

This entry was posted on Sunday, August 26th, 2007 at 12:12 am and is filed under php, web development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply


Search Posts

Pages

Archives

Categories

LinkedIn Profile

  • My Profile

www.flickr.com


My ideal work culture:
[See my summary] [What’s yours?]


All contents are (c) Copyright 2024, Nitobi Software Inc. All rights Reserved
Alexei@Nitobi Entries (RSS) and Comments (RSS).