I just spent a half hour narrowing down a bug in an application I’d fut some polishing touches on in PHP5. When it was moved onto the production server earlier, it came up with blank pages. I wasn’t on hand to check it out, so couldn’t help over the phone. I had to wait until I could get to a computer to debug it.
The end problem was in a line similar to the following:
$n=$db->query('select id from some_table')->numRows();
The above worked in every server I had available – except the one it was supposed to go on.
To get that code working in PHP4, you must break the object results down:
$n=$db->query('select id from some_table'); $n=$n->numRows();
It’s an annoyance – but at least it’s not a large thing to fix, and the lines that need changing can easily be found by