You are here: Re: Are there static functions in PHP? « PHP Programming Language « IT news, forums, messages
Re: Are there static functions in PHP?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация