[PHP] Private functions
Hi, Is there a way to make a function 'private' in a php class? I'm guessing there isn't since I haven't been able to find reference to it in the php docs, but if this is the case, is there some way I can emulate private scoping? thanks, James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Private functions
So sprach »James Gregory« am 2001-09-19 um 19:27:27 -0400 : Is there a way to make a function 'private' in a php class? In PHP 4.0.x - no. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 1 day 1 hour 40 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] private functions
Hello, Sorry, i posted this to my local newsfeed a while ago but i don't think it is propogating properly, however i apologise if this appears twice. --- i've been using private functions like the code below a little, and just discovered that if you call the outside function more than once you get an error. Apparently it doesn't like redeclaring the inside function the second time you call the outside function... this seems strange to me. Any help would be appreciated. ? function foo(){ function private_to_foo(){ echo(this is private to foo\n); } // call my private function echo(Hello, calling my private function\n); private_to_foo(); } // call our function echo(About to call foo\n); foo(); // if you call it again it dies foo(); ? Lukas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]