overlading constructor and functions in PHP 4



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

.



Relevant Pages

  • Re: How about const supporting array in future?
    ... Yarco wrote: ... If you overload the class' __setfunction you can effectively make it ... PHP Encryption Class ...
    (comp.lang.php)
  • Re: Case sensitivity in programming languages.
    ... Every time someone creates a post about case sensitve languages I reserve ... At least not in PHPP, ... Thus I can create different things called 'foo' and reference each ... sensitive languages trying to force case sensitivity into ALL languages. ...
    (comp.lang.php)
  • Re: PHP as a secure language? PHP worms? [was: Re: new linux malware]
    ... _Programming Languages: Concepts and Paradigms_ he defines some of the paradigms of programming languages; on pp 12-13, ... This book is classic but doesn't list Perl or PHP or Java -- but the concepts are the same. ...
    (Bugtraq)
  • Re: Php invented by a former DECcie ?
    ... Dijkstra would have said about these languages as compared to his ... PHP does not even have a goto statement. ... It's not the perfect scripting language but it has gotten a lot better over the years. ... If Perl or PHP will get it done faster that's what you use. ...
    (comp.os.vms)
  • Re: PHP global namespace clogged up
    ... Only a bad programmer would confuse the two. ... PHP does not have linking. ... > This is why most programming languages have namespaces - and use them. ... None of the languages I have used in the past 30 years have had namespaces. ...
    (comp.lang.php)