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
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
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
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
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
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]
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"
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
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.
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
> -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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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();
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
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
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
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
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
> -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)
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
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
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
35 matches
Mail list logo