« on: November 26, 2012, 04:44:12 pm »
As for adding the datatype before the variable name, for some names, it's probably obvious and in some ways can be the convention itself. Some people are also better at naming things than others. I feel that I can come back a year later, read my code, and understand that, yeah, $strTitle is supposed to be a string that holds a title to something.This sort of “Hungarian notation” for types is more or less pointless in a strongly+statically typed language like C, though I do not deny the efficacy of Apps Hungarian in certain situations. I suspect many coders would have a visceral reaction to a variable name like $strTitle in that that shouldn’t have to be something so important to the variable that it needs to be in the name, but then again those coders don’t PHP.