I'm trying to write my code as maintainable and easy to understand as possible, and I thought of including the type of data a variable holds in its name.
e.g:
$intCurrentLine = 1; instead of $currentLine = 1;
$strUser = 'blah'; instead of $user = 'blah';
I don't think it is really necessary in the above example, but may it be helpful in some cases?
best regards, lamas
Adding the type to the name of the variable is called Hungarian Notation.
It's a matter of style in typeless languages such as PHP and VB. I prefer not to use because there isn't a real need.
This is a good article on the topic. http://www.joelonsoftware.com/articles/Wrong.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With