[PHP-DEV] abstract static

2006-03-01 Thread Derick Rethans
Hello! What is the reason why "abstract static" is no longer allowed in HEAD? regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] abstract static

2006-03-01 Thread Marcus Boerger
Hello Derick, a static method is invoked without an instance but through the class. An abstract method is a placeholder that allows calling at that level of hierarchy. So when you have a code that deals with some objects derived from an abstract class you may call the abstract method on that ins

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Marcus Boerger
Hello internals, it looks like either nobody objects or nobody has interest. Either way i tested the patch and worked helped it a bit and it looks good, doesn't affect anything else and doesn't show a single problem in valgrind. So If noone objects i will commit this next week. regards marcus

Re: [PHP-DEV] extension and apache 2.x compatibility issue.

2006-03-01 Thread D. Walsh
On Feb 26, 2006, at 22:17 , Rasmus Lerdorf wrote: D. Walsh wrote: On Feb 24, 2006, at 07:11 , Wez Furlong wrote: My suggestion is to download, compile and use valgrind and see what problems that highlights in your code. Since you are specifically directing me to do this I will attempt to ge

RE: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Dmitry Stogov
Can I look into patch? Dmitry. > -Original Message- > From: Marcus Boerger [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 01, 2006 1:01 PM > To: PHP-DEV > Cc: Andi Gutmans; Mike Lively > Subject: Re: [PHP-DEV] [PATCH] Late Static Binding > > > Hello internals, > >it looks like

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Marcus Boerger
Hello Dmitry, of course, what hinders you? See original mail from Mike: http://news.php.net/php.internals/21991 regards marcus Wednesday, March 1, 2006, 12:51:51 PM, you wrote: > Can I look into patch? > Dmitry. >> -Original Message- >> From: Marcus Boerger [mailto:[EMAIL PROTECTED]

RE: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Dmitry Stogov
I didn't look into the patch deep. But I see one critical issue: Patched PHP will modify zend_function->caller_scope at runtime. This can break ZTS version and probaby opcode caches. Storing runtime information in zend_function is bad decision. Also the name "static" confusing me. Because "self"

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Marcus Boerger
Hello Dmitry, i guess there was enough discussion on the name and we do not want to create another solwdown or BC by adding either slow string comparisions or a new keyword. Anyway how can this affect ZTS version? We are working on copies here as far as i know. And the information is touched at

RE: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Dmitry Stogov
1) I would very like to see some real example where "static" is necessary? 2) "static" is really bad name. I suggest "caller", Marcus thought about "class". 3) I COMPLETELY DISAGREE TO ADD RUNTIME DATA INTO zend_function/zend_op_array. We can try to store "caller_scope" in execute_data. Thanks.

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Lukas Smith
Dmitry Stogov wrote: 1) I would very like to see some real example where "static" is necessary? I think Mike illustrated this in his post. Or do you want a "real" world example? 2) "static" is really bad name. I suggest "caller", Marcus thought about "class". I dont really see an issue wi

RE: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Dmitry Stogov
> -Original Message- > From: Lukas Smith [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 01, 2006 5:50 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] [PATCH] Late Static Binding > > > Dmitry Stogov wrote: > > 1) I would very like to see some real example where "static" is

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Lukas Smith
Dmitry Stogov wrote: Yes I like not a sintetic test but real life example (singleton, factory or something else). (I tried to write generic singleton but it wasn't exelent.) Yeah a singleton method that calls a factory method is a prime example. Now if you want to inherit that class you will

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Zeev Suraski
At 16:50 01/03/2006, Lukas Smith wrote: Dmitry Stogov wrote: 1) I would very like to see some real example where "static" is necessary? I think Mike illustrated this in his post. Or do you want a "real" world example? 2) "static" is really bad name. I suggest "caller", Marcus thought about

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Lukas Smith
Zeev Suraski wrote: I actually don't recall there was consensus on even adding this feature in the Paris meeting, let alone how to name it. To quote the meeting results as linked in Mike's original post: 1. We re-use the "static::" keyword to do runtime evaluation of statics. 2. Marcus

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Jochem Maas
Zeev Suraski wrote: At 16:50 01/03/2006, Lukas Smith wrote: Dmitry Stogov wrote: 1) I would very like to see some real example where "static" is necessary? I think Mike illustrated this in his post. Or do you want a "real" world example? 2) "static" is really bad name. I suggest "calle

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Lukas Smith
Jochem Maas wrote: rather than an alternative form of static method calling or a new class related keyword, maybe a new magic constant would be sufficient? e.g. __CCLASS__ (C for 'Called') or __OWNER__ (the class the 'owns' the method? [from the view point of the caller]) i dont re

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Zeev Suraski
At 18:32 01/03/2006, Lukas Smith wrote: Zeev Suraski wrote: I actually don't recall there was consensus on even adding this feature in the Paris meeting, let alone how to name it. To quote the meeting results as linked in Mike's original post: 1. We re-use the "static::" keyword to do run

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Lukas Smith
Zeev Suraski wrote: 1. I don't think it's a very important feature, even though like any other feature we could possibly think of, we can come with use cases where it would be useful. In terms of complexity vs. usefulness, I think it's more complex than useful. So how about this ... make

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Marcus Boerger
Hello Lukas, no the way things are now are just as expected. marcus Wednesday, March 1, 2006, 6:08:23 PM, you wrote: > Zeev Suraski wrote: >> 1. I don't think it's a very important feature, even though like any >> other feature we could possibly think of, we can come with use cases >> wh

RE: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Derick Rethans
On Wed, 1 Mar 2006, Dmitry Stogov wrote: > Yes I like not a sintetic test but real life example (singleton, factory or > something else). > (I tried to write generic singleton but it wasn't exelent.) I do have an example somewhere, but I have to find it again :) regards, Derick -- PHP Internal

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Derick Rethans
On Wed, 1 Mar 2006, Zeev Suraski wrote: > I actually don't recall there was consensus on even adding this feature in the > Paris meeting, let alone how to name it. You didn't object to the meeting notes either (on this part). This is the link to the notes again: http://www.php.net/~derick/meeti

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Derick Rethans
On Wed, 1 Mar 2006, Lukas Smith wrote: > Zeev Suraski wrote: > > > 1. I don't think it's a very important feature, even though like any other > > feature we could possibly think of, we can come with use cases where it > > would be useful. In terms of complexity vs. usefulness, I think it's mor

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Lukas Smith
Dmitry Stogov wrote: Patched PHP will modify zend_function->caller_scope at runtime. This can break ZTS version and probaby opcode caches. Storing runtime information in zend_function is bad decision. maybe stating the obvious here .. but opcode caches are important to everybody on this list

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Lukas Smith
Marcus Boerger wrote: Hello Lukas, no the way things are now are just as expected. my point was this: why even bother with self:: ? you could just as well use the class name. its just syntactical sugar .. however late static binding actually gives you a useful feature (well one could argue

[PHP-DEV] ZEND_HASH_APPLY_* confusion

2006-03-01 Thread Marcus Boerger
Hello internals, we have the consts: #define ZEND_HASH_APPLY_KEEP0 #define ZEND_HASH_APPLY_REMOVE 1<<0 #define ZEND_HASH_APPLY_STOP1<<1 and the apply functions: ZEND_API void zend_hash_apply(HashTable *ht, apply_f

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Jeff Moore
On Mar 1, 2006, at 9:37 AM, Dmitry Stogov wrote: 1) I would very like to see some real example where "static" is necessary? Some use cases for late static binding, tested using self on 5.1.2: 1. What class am I really? class A { static function myclass() { return get_class();

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Jeff Moore
On Mar 1, 2006, at 3:45 PM, Jeff Moore wrote: static protected function configure($obj) { $obj = 'A'; } Oops. That should be $obj->iprop = 'A'. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Jeff Moore
On Feb 23, 2006, at 5:06 PM, Mike Lively wrote: I also added a new function get_caller_class() which returns the name of the class that static:: would represent. I find get_caller_class() a bit confusing because it introduces new terminology (caller). May I suggest adding: get_self_class

[PHP-DEV] CVS Account Request: migurski

2006-03-01 Thread Michal Migurski
My PEAR proposal (http://pear.php.net/pepr/pepr-proposal-show.php?id=198) was accepted, and I'd like to get it into CVS please. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Andi Gutmans
At 06:37 AM 3/1/2006, Dmitry Stogov wrote: 1) I would very like to see some real example where "static" is necessary? It's needed when you implement a convention based system where the name of the Class has a meaning. For example in an OORDBMS mapping system, the name of the class could be th

[PHP-DEV] Re: cvs: php-src /ext/mbstring mbstring.c

2006-03-01 Thread Sebastian Bergmann
Yasuo Ohgaki schrieb: > yohgaki Thu Mar 2 00:34:28 2006 UTC > > Modified files: > /php-src/ext/mbstring mbstring.c > Log: > add safe_mode num of parameter check There is / will be no safe_mode in HEAD anymore. -- Sebastian Bergmann

RE: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Dmitry Stogov
> -Original Message- > From: Andi Gutmans [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 02, 2006 5:51 AM > To: Dmitry Stogov; 'Marcus Boerger'; 'Mike Lively' > Cc: 'PHP-DEV' > Subject: RE: [PHP-DEV] [PATCH] Late Static Binding > > > At 06:37 AM 3/1/2006, Dmitry Stogov wrote: > >1)

RE: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Dmitry Stogov
Hi Jeff, Your examples 1-4 are bad. They snould use non-static methodos. Example (5) make sense, but it is not exelent (I did the same :), because "A" MUST be child of Singleton and it must declare special property. BTW: generic singletons can be implemented with one very simple function functi

RE: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread Dmitry Stogov
Agree. The following constructs should use the same :::foo() get__calss() > -Original Message- > From: Jeff Moore [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 02, 2006 2:04 AM > To: 'Mike Lively' > Cc: PHP-DEV > Subject: Re: [PHP-DEV] [PATCH] Late Static Binding > > > > On Feb 2

Re: [PHP-DEV] [PATCH] Late Static Binding

2006-03-01 Thread David Zülke
Your examples 1-4 are bad. They snould use non-static methodos. Wrong. Example: Singletons where you could just do "MyObj extends SingletonObj" without having to re-implement getInstance(). - David -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php