In The world's two worst variable names Andy Lester announces (as one might already have guessed from the title of his entry) the worst variable names ever since: The first one is $data, immediately followed by $data2.

Since reading that, I have been feeling bad all day and I hereby plead myself guilty for having used $data as well.

I agree with Andy that things like $data probably do not make much sense semantically and I hereby pledge amendment. But apart from semantically futile variable names, there are the ones that look stupid: The most outstanding ones are probably variable names containing umlauts. Believe me or not, but I have seen PHP code from a rather experienced programmer, which made extensive use of umlauts in variable names. Until then I did not even know that there are languages allowing umlauts in symbol names.

Written on 13 Mar 04 06:08 PM.