ID: 19478
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-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] [EMAIL PROTECTED]
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] [EMAIL PROTECTED]
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