Re: [PEPr] Comment on Web Services::Services_TinyURL
| From: | Matthew Weier O'Phinney | Date: | Tue, 11 Sep 2007 17:46:55 +0000 |
| Subject: | Re: [PEPr] Comment on Web Services::Services_TinyURL | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47991@lists.php.net to get a copy of this message | ||
On 9/11/07, Joe Stump <joe@joestump.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
mweierophinney@gmail.com
http://weierophinney.net/matthew/