On Wed, April 18, 2007 3:59 am, Chris Boget wrote:
>> So only one of these is "kosher"
>> static:
>> return Services_JSON::decode($data);
>>
>> class:
>> $json = new Services_JSON;
>> return $json->decode($data);
>> but not both.
>
> I'm not trying to start (or further add fuel to) any kind of war but
> instead
> an earnest question: why not both?

There's some sort of OOP "principle" that a static function shouldn't
be allowed to be called on an instance, or you shouldn't be allowed to
instantiate a static class or somesuch thing...

I don't really remember what the driving force behind it is, but it's
in the Internals archives with links to Wikipedia OOP articles if you
want to find it.

It doesn't seem very PHPragmatic to me, but apparently it's Very
Important to some OOP advocates.

I think the principles are named after some dude whose name is Polish
or at least Eastern European, and it starts with a 'W' if that helps
find the thread/link...

I want to say Wronski, but that's Quidditch, not OOP. :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to