List Info

Thread: Re: Comment on Web Services::Services_TinyURL




Re: Comment on Web Services::Services_TinyURL
user name
2007-09-11 12:46:55
On 9/11/07, Joe Stump <joejoestump.net> wrote:
> > Or did I miss anything?
>
> The functions are declared static. It'd throw
errors/notices.

You can call static members using normal object notation,
and PHP does
not raise any warnings or notices:

    class Foo
    {
        public static function bar()
        {
            echo 'Foo::Bar';
        }
    }

    class Baz extends Foo
    {
    }

    $foo = new Foo();
    $foo->bar(); // echos 'Foo::Bar'

    $baz = new Baz();
    $baz->bar(); // echos 'Foo::Bar'

If you redefined the method to be non-static, yes, you'd get
errors, but
the above works fine.

-- 
Matthew Weier O'Phinney
mweierophinneygmail.com
http://weierophinne
y.net/matthew/

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )