>> *nods* It's a pretty evil behavior, IMHO. It's all too common to
>> have
>
> It has been like that for ages as far as I know and plenty of code
> relies on it, so it can't be changed really.
Better late than never. I've got a ton of code depending on it too,
but believe me when I say doing:
find . -type f -name '*.php' -exec perl -pi -e
's#\s*==\s*[']([tf])[']##g' {} \;
will make me very happy.
>> 100K lines of web goo. *sighs* Moved a large database schema from
>> INTs to BOOLs, and unpleasantly discovered that PHP returns a string
>> that
>
> May I ask why you changed it in the first place? (-:C
Yeah, the booleans were being stored as INTs. When you've got 20-50M
records and a dozen booleans stored as integers, the space savings gets
to be huge. Nevermind that there's a 20-30% speed difference using
booleans vs INTs.
> You mentined the principle of leat surprise, I answer with "if it
> ain't broken, don't fix it" ;-)
It is broken though. Release a big errata note and upgrade notice, but
it should be fixed. I haven't heard one person who thinks that the
current behavior is the correct behavior. PHP5 hasn't come to rule the
day yet and many people are still using PHP4. Update it now while its
still at the beginning of the 5 release cycle, otherwise it'll have to
wait till 6. :( -sc
--
Sean Chittenden