# #20760 : is it really the intended behavior ?

- Thread: https://externals.io/message/10831
- Original archive: https://news-web.php.net/php.internals/10831
- Started by Mehdi Achour on 2004-06-28T17:48:37+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #10831 — Mehdi Achour — 2004-06-28T17:48:37+00:00

URL: https://externals.io/message/10831#10831

Hi internals,

Trying to close some documentation bugs, I saw #20760.
Here's the problem :

class Foo {
   var $bla;

   function quux() {
     $this->bla = 5;
   }
}

class Bar {
   var $bla;

   function do_stuff() {
     $this->bla = 10;
     Foo::quux();
     echo $this->bla;
   }
}

$blabla = new Bar;
$blabla->do_stuff(); // will print 5, Foo::$bar value

Derick claimed that it was an intended behavior, I'd like to
make sure before documenting it. I'd also like to know why
do we have this feature ? It's quiet confusing.

Thank you in advance,

Mehdi Achour

---

## #10832 — Sara Golemon — 2004-06-28T18:31:54+00:00

URL: https://externals.io/message/10831#10832 · In reply to: #10831

> Derick claimed that it was an intended behavior, I'd like to
> make sure before documenting it. I'd also like to know why
> do we have this feature ? It's quiet confusing.
>
You would doubt Derick? Shame!

Yes, this is intended behavior, primarily to allow children to call parents
staticly and still have $this available for parents to modify properties.

The fact that it works across non-relatives is simply a side-effect.

-Sara
