Re: [PHP-DEV] Static call detection

2004-10-05 Thread Hans L
Wez Furlong wrote: It is *not* ok to have a static method try and work like a non static method. In PHP 5, declaring a static method will prevent $this from being initialized. static means static. Take this as a hint that what you're trying to do it wrong :-) As others have mentioned on the list (

Re: [PHP-DEV] Static call detection

2004-10-04 Thread Marek Kilimajer
Marcus Bointon wrote: on 4/10/04 13:34, Christian Schneider at [EMAIL PROTECTED] wrote: I dare to disagree. For tool functions it often makes sense to make them statically callable while you still might want to use them in an object instance context respecting the instance's state. It may seem a b

Re: [PHP-DEV] Static call detection

2004-10-04 Thread Christian Schneider
Marcus Bointon wrote: To summarise, you can't tell, and you shouldn't be trying to anyway. That seems to be the consensus. I find it a pity as I like PHP for giving programmers freedom instead of telling them how to do things but oh well... :-) Over and out, - Chris -- PHP Internals - PHP Runtim

Re: [PHP-DEV] Static call detection

2004-10-04 Thread Marcus Bointon
on 4/10/04 13:34, Christian Schneider at [EMAIL PROTECTED] wrote: > I dare to disagree. For tool functions it often makes sense to make them > statically callable while you still might want to use them in an object > instance context respecting the instance's state. It may seem a bit > hacky but I

Re: [PHP-DEV] Static call detection

2004-10-04 Thread Wez Furlong
I was asked off-list by someone else why I thought it was wrong, it turns out that I wasn't as clear as I could have been, so I'm going to follow up here and then withdraw (because I don't consider it an internals matter). It *is* ok to have a static method and call it either statically or not, pr

Re: [PHP-DEV] Static call detection

2004-10-04 Thread Christian Schneider
Wez Furlong wrote: If a method is static, you should only ever call it statically. Doing any other tricks is just plain wrong. I dare to disagree. For tool functions it often makes sense to make them statically callable while you still might want to use them in an object instance context respecti

Re: [PHP-DEV] Static call detection

2004-10-04 Thread Wez Furlong
If a method is static, you should only ever call it statically. Doing any other tricks is just plain wrong. If you still want to know the answer, ask the question on the correct list; what you've asked has nothing to do with hacking on the internals of PHP in C. --Wez. On Mon, 04 Oct 2004 13:01:5