ID: 25167
Updated by: [EMAIL PROTECTED]
Reported By: bakkerl at lamp dot xs4all dot nl
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: RedHat 9
PHP Version: 4.3.2
New Comment:
If your script didn't have all those errors, it would work just
fine..(hint: $this->a)
Previous Comments:
------------------------------------------------------------------------
[2003-08-20 02:59:05] bakkerl at lamp dot xs4all dot nl
Description:
------------
A class which contains more than 1 variable, all varible gets the same
values. The all get the value of the last value assinging.
Reproduce code:
---------------
<?php
class test
{
var $a;
var $b;
function test()
{
$this->$a = "Hello";
$this->$b = "World!";
}
function showWorld()
{
echo $this->$a." ".$this->$b;
}
}
?>
Expected result:
----------------
After calling showWorld() i would expect to see:
"Hello World!".
Actual result:
--------------
After calling showWorld() i got:
"World! World!"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25167&edit=1