cvs: php4 /tests/lang bug21669.phpt
| From: | Stanislav Malyshev | Date: | Mon, 16 Jun 2003 12:26:07 +0000 |
| Subject: | cvs: php4 /tests/lang bug21669.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-21777@lists.php.net to get a copy of this message | ||
stas Mon Jun 16 08:26:07 2003 EDT
Added files:
/php4/tests/lang bug21669.phpt
Log:
Add test for the bug - will fail for now!
Index: php4/tests/lang/bug21669.phpt
+++ php4/tests/lang/bug21669.phpt
--TEST--
Bug #21669 "$obj = new $this->var;" doesn't work
--FILE--
<?php
class Test {
function say_hello() {
echo "Hello world";
}
}
class Factory {
var $name = "Test";
function create() {
$obj = new $this->name; /* Parse error */
return $obj;
}
}
$factory = new Factory;
$test = $factory->create();
$test->say_hello();
?>
--EXPECT--
Hello world