Details
-
Type:
Task
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 2.0
-
Component/s: None
-
Security Level: All
-
Labels:None
Description
The reasoning is simple: The prefix "_" is usually either used for easier distinction of instance variables from other, i.e. local variables, instead of always using "this." (often seen in C#), or it is used to signal that a member is not meant to be accessed from outside of the class when the language does not have visibility modifiers (PHP4).
Since you always have to use "$this->" in PHP5+ when accessing instance members and there are visibility modifiers, the "_" is largely superfluous and just makes the verbose OO code even more verbose.
Maybe the following find/replace steps will do the job almost completely:
"private $_" => "private $" "protected $_" => "protected $" "$this->_" => "$this->"