Clear the PHP4 warnings when working in eclipsePHP

By Benjamin Hill (salamander)
A series of search-and-replace that you can run on the latest alpha release to clear the majority of EclipsePHP's warnings, without (hopefully!) breaking anything.

CakePHP - a great framework, but sometimes surprising to those who are used to programming with PHP 5. EclipsePHP spits out pages and pages of warnings when compiling towards a PHP 5 base, scaring new CakePHP converts.


Run the following replacements in eclipse across the entire workspace as case-sensitive matches. This follows the https://trac.cakephp.org/wiki/Developement/CodingStandards



  1. &$ -> $
  2. var $__ -> private $__
  3. var $_ -> protected $_
  4. var $ -> public $
  5. function -> public function
  6. public function _ -> protected function _
  7. protected function __ -> private function __