Re: Re: Static weirdness..
| From: | Marcus Boerger | Date: | Thu, 19 Feb 2004 14:49:42 +0000 |
| Subject: | Re: Re: Static weirdness.. | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7991@lists.php.net to get a copy of this message | ||
Hello Hartmut,
Thursday, February 19, 2004, 10:03:33 AM, you wrote:
> Greg Beaver wrote:
>> Hi,
>>
>> I agree that allowing $a->bar() with a static method is too confusing,
>> and should not be allowed. However, the ability to call a static method
>> of an object (variable class name, in other words), is invaluable. What
>> if PHP simply allowed $object::staticMethod() syntax?
> Why do i (as a user of a class) have to know whether a member function
> is static or not? Having two different calling conventions is what
> appears to be confusing to me ...
A static and a non static member function are two absolute completley
different things. Anyway calling a static method from an instance as
$instance->staticmethod() or $instance::staticmethod() should be allowed.
I guess the latter is what Lukas and Hartmut meant.
--
Best regards,
Marcus mailto:helly@php.net