|
PHP5 is backwards compatible in at least the first of the 2 examples you point out. Although it is depricated, the keyword var will not break PHP5.
i do host websites and there are a couple other reasons i hesitate to make the switch. i recently ported a pretty large scale enterprise web app (for my day job) from PHP4 to PHP5 and here are a couple of details that really broke the product.
1. array_merge will break. array_merge supported mixed input in PHP4. for example, you could merge an array with a non array and it would put them both into the same array. but now if you put a non array into an argument of array_merge, it will break.
2. unset() . unset() seems to break if there is a variable that hasn't been set or is st to null. i don't remember the specifics, but i know there were problems related to unsetting vars that weren't set.
3. when comparing a string to an integer, the string evaluates to zero before it is compared. this means: 'abcdefg' == 0. You can probably imagine the problems it may cause if you might be expecting a 0 as valid input to something that is checking on a string and the zero has not been cast to a string ahead of time.
great thread. the topic would make a great article.
__________________
Mike
|