Re: Coding standards

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: Coding standards
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-873@lists.php.net to get a copy of this message
On Wed, 18 Jul 2001, Erik Hjortsberg wrote: > I think it should be applied to variables too: > var $_foo; > > Unlawfully changing a private variable is often more dangerous than > calling a private method as the error won't be notices as easily. I agree using _ in front of private variable is a good idea. Still, a class should have set*() methods for modifying variables. So if youre modifying them directly you allready are intentionally doing something risky anyway. -- Mika Tuupola http://www.appelsiini.net/~tuupola/

« previous php.pear.dev (#873) next »