Re: [PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-24 Thread Marek Kilimajer
Curt Zirzow wrote --- napísal:: * Thus wrote Marek Kilimajer: Chris wrote --- nap?sal:: if anyone can, would you please explain why the below code does what it does? I would expect $this->test in TestInstance to refer to the inherited $test from Test. Using php5RC3. Thanks. class TestInstanc

Re: [PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-23 Thread Curt Zirzow
* Thus wrote Marek Kilimajer: > Chris wrote --- napísal:: > >if anyone can, would you please explain why the below code does what it > >does? I would expect $this->test in TestInstance to refer to the > >inherited $test from Test. Using php5RC3. Thanks. > > > > >abstract class Test { > >pr

Re: [PHP] issue with inheriting private property from abstract class

2004-06-23 Thread Justin Patrin
It's still a member, it just can't be accessed by the sub-class's methods. If you call the parent's methods or a method in the parent is called that isn't defined in the subclass, the private property is still there are still used as normal. On Wed, 23 Jun 2004 18:35:14 -0400, Chris <[EMAIL PROTEC

Re: [PHP] issue with inheriting private property from abstract class

2004-06-23 Thread Chris
ok, i understand now that private members are NOT inherited. i guess it was just throwing me off that var_dump()/print_r() display the parents private member, even tho its not really a member of the subclass. thanks Marek Kilimajer wrote: Chris wrote --- napísal:: if anyone can, would you pleas

Re: [PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-23 Thread Marek Kilimajer
Chris wrote --- napísal:: if anyone can, would you please explain why the below code does what it does? I would expect $this->test in TestInstance to refer to the inherited $test from Test. Using php5RC3. Thanks. class TestInstance extends Test { public function __construct() { $

Re: [PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-23 Thread Justin Patrin
Do you have E_STRICT turned on? If not, I believe PHP5 lets you access private / protected vars wherever you want. On Wed, 23 Jun 2004 13:40:48 -0400, Chris <[EMAIL PROTECTED]> wrote: > > if anyone can, would you please explain why the below code does what it > does? I would expect $this->test i