PHP Annoyances
March 09, 05 by kenrichLately I have been fighting with a PHP conversion of my web sites. There’s a lot of work left to do until I get the site up and running the way that I’d like. For now, let me take this opportunity to discuss some of the things that really irk me about PHP.
- Case-sensitive variables
- Case-sensitive form and query variables
- either array_key_exists or mysql_fetch_assoc doesn’t work properly, because my null fields are nowhere to be found.
- Warning messages when referencing a hash array element that doesn’t exist
- No application-scoped variable (you have to use the shared memory module as a work-around)
- Include paths for the “require” and “include” statements. (shouldn’t the web site root automatically be appended to the search path?)
- No function to take the difference of two dates in a unit such as days, hours or minutes. (yeah, I’m too lazy to convert from seconds)
This is just a few of the problems I have encountered so far. I’m sure there will be more. On the plus side, I have been really impressed with the large amount of functions that are available. It really helps when developing complex applications. And of course the cross-platform (runs on Windows or UNIX) is a definite added bonus.