Re: Variables in PHP: public vs. private
| From: | hassan | Date: | Fri, 17 May 2002 12:10:30 +0000 |
| Subject: | Re: Variables in PHP: public vs. private | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98070@lists.php.net to get a copy of this message | ||
HI,
as far as i know private vars should be available in the next release of the zend engine, thus, using get and set functions is a good practice to be sure that your apps will still function in future php releases.
Regrads.
___________________________________________________
Hassan El Forkani
Founder And Mantainer of :
http://WarmAfrica.com EveryOne's Africa
Freelance Internet Consultant / Web Applications Developper.
Email: hassan@warmafrica.com
Tel : 0021671880014
___________________________________________________
At 14:36 17/05/02, Christoph Starkmann wrote:
Hi there! I'm just starting to get in touch with oo programming in PHP. Now I've got a quite simple question, I guess... In an example in the PHP-help, I found a class definition with accessor functions like dummy->get_some_variable(); But AFAIK (and see ;)), variables in PHP in fact are never private, but always public, at least within the current script. So what would be the sense in having this kind of functions? Readability? Just a fake? Or can I declare variables as private? (this would be the best in my eyes, indeed) Thanx alot, Kiko -- It's not a bug, it's a feature. christoph starkmann mailto:kiko@nfq.de http://www.gruppe-69.com/ -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php___________________________________________________ Hassan El Forkani Founder And Mantainer of : http://WarmAfrica.com EveryOne's Africa Freelance Internet Consultant / Web Applications Developper. Email: hassan@warmafrica.com Tel : 0021671880014 ___________________________________________________