PHP 4.0 Bug #6040: PHP Crashed if class contain reference by other class
| From: | rezinkin at mail dot ru | Date: | Wed, 09 Aug 2000 05:38:19 +0000 |
| Subject: | PHP 4.0 Bug #6040: PHP Crashed if class contain reference by other class | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-28213@lists.php.net to get a copy of this message | ||
From: rezinkin@mail.ru
Operating system: Windows95 ORS2
PHP version: 4.0.1pl2
PHP Bug Type: Reproduceable crash
Bug description: PHP Crashed if class contain reference by other class
+++ crashed script:
<?
class B {
var $pA;
function B()
{
}
function Show_m_A()
{
echo $this->pA->Show_m_A();
}
}
class A {
var $m_A;
var $B;
function A($a)
{
$this->m_A = $a;
$this->B = new B();
$this->B->pA = &$this;
}
function Show_m_A()
{
echo "A->m_A = ".$this->m_A.'<BR>';
}
function Show_B_m_A()
{
echo $this->B->Show_m_A();
}
}
$a = new A(1);
$a->Show_m_A();
echo "<HR>";
$a->Show_B_m_A();
echo "<HR>";
$a->m_A = 2;
$a->Show_m_A();
echo "<HR>";
$a->Show_B_m_A();
echo "<HR>";
?>
+++ php.ini - default
+++ Additionlal modules : none