On Jan 30, 2008 11:31 AM, Stut <[EMAIL PROTECTED]> wrote:

>
> "I would *just* use a static method"
>
> *just* *just* *just* *just* *just* *just* *just* *just* *just*
>
> No instance. None. Grrr.


here is a mod of the code you posted w/ a var_dump() of the
local variable $o;

<?php
class Test {
    public static function doSomething() {
        $o = new Test();
        var_dump($o);
        $o->_doSomething();
    }

    protected function _doSomething() {
        // I'm assuming this method is fairly complex, and involves
        // more than just this method, otherwise there is no point
        // in creating an instance of the class, just use a static
        // method.
    }
}
Test::doSomething();
?>

[EMAIL PROTECTED] ~/ticketsDbCode $ php testCode.php
object(Test)#1 (0) {
}


clearly in the act of *just* using a static method, you *just*
created an instance of class Test ;)

-nathan

Reply via email to