This is a sort of general inquiry I've been wondering about. I've noticed a lot of this through other people's code, and never really knew the actual reason, just followed the trends, so here goes.
How come some methods and properties are named with an underscore in front, and others aren't?
For example, when specifically would one use function _method()
, and when would one use function method()
, or, in other words, private $_someVariable
vs. private $someVariable
?