CHAPTER 12 – PEAR STANDARDS – Member Variables

The only requirement for member variables is that private members should be underscore-prefixed in PHP 4-compatible code. There is no notion of "protected" for PHP 4: class Foo { var $public_member; var $_private_member; } For PHP 5-only code, use the private/protected/public modifiers properly: class Foo { public $member_variable; protected $protected_member; private $private_member; static $static_classvar; const CLASS_CONSTANT; }

Post Comment
Login to post comments