On 18 Feb 2004 at 12:33, John Coggeshall wrote:

> No. There is *no* reason why static methods should be called from 
an
> object context. Doing so is more than a notice -- its flat out wrong 
and
> defeats the entire purpose of having static in the first place... 

I agree with John.

I would even go one step further and trigger a "call to undefined 
function" error. I would strictly separate the class scope from the 
instance scope, allowing both a static method and a normal method 
with the same name:

class Example
{
    static function dump()
    {
        print "This is the Example class.\n";
    }

    function dump()
    {
        print "This is an Example object:\n";
        var_dump($this);
    }
}

But I could live without that since it would certainly be very much 
work to implement such a change...

-- 
Ferdinand Beyer
<[EMAIL PROTECTED]>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to