Hello Andrei,

Tuesday, January 6, 2004, 12:34:45 AM, you wrote:

> On Tue, 06 Jan 2004, Marcus Boerger wrote:
>> > On Tue, 06 Jan 2004, Marcus Boerger wrote:
>> >> I see "\$obj->blah" much different becasue it would require evaluating the
>> >> string and access the current symbol table to get $obj. Further more we'd
>> >> need to patch $this and so on. On the other hand $class::$method() should
>> >> access the static property $method of class $class and call the result as a
>> >> function.
>> 
>> > So you are breaking backwards-compatibility? Because in PHP 4
>> > "foo::$b()" would invoke the method named by $b, rather than accessing
>> > propert named by $b calling the result as a function.
>> 
>> I only changed the what can be done with single variables. And there i added
>> the ability to call static methods like you can do from sqlite's sql. Please
>> show me an example that does work in 4 but not in 5 if i missed something.

> By your claim, class::$method() should access static property $method of
> class named 'class' and call the result as a function. It doesn't work
> that way in PHP 4.

That is because in PHP4 we don't have statics and yes it is a BC problem we
must live or we must drop statics.

> Is 'class::method' syntax supported by call_user_function() as well
> then?

No but for that you have call_user_method() or the preferred way of using
the array notation. When i made the patch that allowed static calls from
within sqlite i discussed this with Andi and we thought the array notation
would be enough for call_user_fun(). Howerver i was unaware that the problem
exists for our 'function pointers' as well.

-- 
Best regards,
 Marcus                            mailto:[EMAIL PROTECTED]

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to