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
* 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
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
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
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() {
$
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
6 matches
Mail list logo