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 Jerry Stuckle on 10/03/55 11:26

Mladen Gogala wrote:
> 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.
>

Mladen,

No, private methods are different. C doesn't have classes, so it can't
have class members.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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