Posted by Mladen Gogala on 11/21/20 11:26
On Sat, 10 Sep 2005 16:35:05 +0000, Peter Salzman wrote:
>
> What I really would like is the concept of static functions from the C
> programming language. A static function is one that has strict file scope:
> no function outisde the containing module sees the function.
What you described is called "private method".
class A {
public function now_you_see_me() {...}
private function now_you_dont() {}
}
Function "now_you_dont" will not be visible from any method which is not
a member function of the class A. That is available as of PHP5.
--
http://www.mgogala.com
Navigation:
[Reply to this message]
|