Re: [PHP-DEV] static call bugs?

2001-03-09 Thread André Langhorst

> I don't understand the question. Can you rephrase?

I simply wanted to know what you had in mind, where could it be useful...


andré

-- 
· André Langhorstt: +49 331 5811560 ·
· [EMAIL PROTECTED]  m: +49 173 9558736 ·
* PHP Quality Assurance  http://qa.php.net  *


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] static call bugs?

2001-03-09 Thread Andi Gutmans

If you have:

class foo
{
 function blahblah()
 {

 }
}

class foobar extends foo
{
}

class bar extends foobar
{
 function hey()
 {
 foo::blahblah(); <-- You want $this to be correct in 
foo::blahblah.
 }

}

Andi

At 01:32 AM 3/10/2001 +0100, André Langhorst wrote:

>>Is that bad? Could come in useful, especially when calling parent
>>classes.
>
>wow, what a quick response :)
>could you elaborate (I guess you do not have parent:: in your mind writing 
>from parent classes)?
>
>andré
>
>
>
>
>
>--
>· André Langhorstt: +49 331 5811560 ·
>· [EMAIL PROTECTED]  m: +49 173 9558736 ·
>* PHP Quality Assurance  http://qa.php.net  *
>
>
>--
>PHP Development Mailing List 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] static call bugs?

2001-03-09 Thread Andrei Zmievski

On Sat, 10 Mar 2001, André Langhorst wrote:
> could you elaborate (I guess you do not have parent:: in your mind 
> writing from parent classes)?

I don't understand the question. Can you rephrase?

-Andrei

Any sufficiently advanced bug is
indistinguishable from a feature.
-- Rich Kulawiec

--
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] static call bugs?

2001-03-09 Thread André Langhorst


> Is that bad? Could come in useful, especially when calling parent
> classes.

wow, what a quick response :)
could you elaborate (I guess you do not have parent:: in your mind 
writing from parent classes)?

andré





-- 
· André Langhorstt: +49 331 5811560 ·
· [EMAIL PROTECTED]  m: +49 173 9558736 ·
* PHP Quality Assurance  http://qa.php.net  *


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] static call bugs?

2001-03-09 Thread Andrei Zmievski

On Sat, 10 Mar 2001, André Langhorst wrote:
> Hi,
> 
> 1) I am currently completing the php documentation to cover all 
> undocumented features and I have noticed that using a static method call 
> to the same class from on instanciated object exhibits the presence of 
> the instance within the static call

Is that bad? Could come in useful, especially when calling parent
classes.

-Andrei

Linux is like living in a teepee.
No Windows, no Gates, Apache in house.
- Usenet signature

--
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] static call bugs?

2001-03-09 Thread André Langhorst

Hi,

1) I am currently completing the php documentation to cover all 
undocumented features and I have noticed that using a static method call 
to the same class from on instanciated object exhibits the presence of 
the instance within the static call

2) If you uncomment the marked line, you will get an error without any 
reason...

I guess these are bugs, aren't they?
boo=2; // try to remove the comments
 print '$this is ';
 if (!isset($this)) {
 print 'not set';
 foo::zoo();
 } else {
 print 'set';
 $this->zoo();
 foo::zoo();
 }

 }
 function zoo()  {
 print ''.'I have been called '.(!isset($this) ? 
'statically':'via $this->zoo()');
 var_dump($this);
 }

}
$s=new foo();
$s->moo();
?>

andré


-- 
· André Langhorstt: +49 331 5811560 ·
· [EMAIL PROTECTED]  m: +49 173 9558736 ·
* PHP Quality Assurance  http://qa.php.net  *


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]