Getting familiar with PHP 5.3.2
Since I am no real PHP developer (just pretending), I have just started to use PHP 5.3.2., although PHP 5.3.3. was released a while back. The reason for this is that I’ve just installed Aptana Studio 2, which comes with 5.3.2.
After installing Aptana Studio 2, I tried to execute a build/packagetest operation for my latest Wigbi version. It did not work, due to two small modifications in PHP 5.3.2.
First of all, get_class does not accept string parameters anymore, so I’ll just have to change all the places where I use it. Thank GOD for TDD and all unit tests!
I have used get_class in functions where a parameter could either be a string or an object. Instead, I now use is_string, which actually is a lot cleaner and…better.
I’ve also noticed that the parse_ini_file function is a bit shaky. It is no longer able to parse ini files that end with a row at which a parameter is specified (like all my previous ini files). The file cannot be parsed, probably since the line feed is considered to be a part of the parameter value.
I solve this by just adding an extra line after the last parameter. It’s a bit annoying, but I guess that the change is meant to make the function follow some kind of standard, so those extra lines are fine, I guess.
After adjusting my code to these changes, everything ran smoothly once again.