Reply to Re: overlading constructor and functions in PHP 4

Your name:

Reply:


Posted by Schraalhans Keukenmeester on 10/02/05 15:36

joes wrote:
> Hello
>
> I am a php newbie... I like to overload a function in php (as like in
> other oo languages). I didn't get this working. Is an overaloding in
> php not possible? What is about the funtion "overlaod()" in php would
> this be the trick?
>
>
> class Base
> {
> function test()
> {}
>
> function test($param1)
> {}
> }
>
>
> This would end in the error:
>
> "Fatal error: Cannot redeclare Base: test() in Base.php ..."
>
> Thanks in advance for any comments
> regards
> Mark Egloff
>
Overloading as available in strongly typed languages as C++/C# isn't
available in PHP (AFAIK). You can overload __get , __set and __call in
PHP5. Look at http://php.net/overload for details.

Sh

[Back to original 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

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