Mantis - Quercus
Viewing Issue Advanced Details
5882 feature always 04-16-15 14:32 04-19-15 10:18
minemaz  
 
normal  
new  
open  
none    
none  
0005882: can't overwrite protected member value (on quercus-4.0.39)
A protected variable defined by class A
couldn't be overwritten by the class B
which extended class A.

<?php
class A
{
  protected $content;
  public function func() {
    echo "A->content=".$this->content."
";
  }
}
class B extends A
{
  public function func() {
    $this->content = "from B";
    echo "B->content=".$this->content."
";
    parent::func();
  }
}
$b = new B();
$b->func();


PHP 5.3.3 said:

B->content=from B
A->content=from B

but quercus-4.0.39 said:

B->content=from B
A->content=

Notes
(0006626)
minemaz   
04-19-15 10:18   
I want to close this chicket
so it is works fine on quercus-4.0.43.