#19478 [Csd->Bgs]: Two classes error
| From: | k.schroeder@php.net | Date: | Thu, 03 Oct 2002 10:46:51 +0000 |
| Subject: | #19478 [Csd->Bgs]: Two classes error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-21366@lists.php.net to get a copy of this message | ||
ID: 19478
Updated by: k.schroeder@php.net
Reported By: to@andybutkaj.com
-Status: Closed
+Status: Bogus
Bug Type: Class/Object related
Operating System: Windows 2000 and Windows XP
PHP Version: 4.2.2
Previous Comments:
------------------------------------------------------------------------
[2002-10-03 04:47:23] k.schroeder@php.net
Yes it is. To get 5 for the first example, you must output the value of
$y->_value.
Regards, Kai
------------------------------------------------------------------------
[2002-09-18 11:26:15] to@andybutkaj.com
class test
{
var $_value;
function test_static ($to)
{
$this->_value = $to;
}
}
class test2
{
var $_value;
function use_test ()
{
$this->_value = 7;
$y = new test();
$y->test_static(5);
echo "<p>value: ".$this->_value."</p>";
test::test_static (5);
echo "<p>value: ".$this->_value."</p>";
}
}
$x=new test2();
$x->use_test();
First echo returns value 7
Second echo returns value 5
is this correct?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19478&edit=1