PHP 4.0 Bug #4658: global parameters in class
| From: | chedong at yeah dot net | Date: | Mon, 29 May 2000 09:14:40 +0000 |
| Subject: | PHP 4.0 Bug #4658: global parameters in class | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-19658@lists.php.net to get a copy of this message | ||
From: chedong@yeah.net
Operating system: freebsd
PHP version: 4.0.0 Release
PHP Bug Type: Other
Bug description: global parameters in class
following code runs properly in php3 but failed at line 3 in php4
<?php
class test {
var $test = $PHP_SELF;
var $test1 = "ok";
function show_test()
{
echo $this->test;
echo $this->test1;
}
}
$testing = new test;
$testing->show_test();
?>
the error shows:
Parse error: parse error in /home/chedong/public_html/test2.php on line 3
i wrote this for i find some classes i wrote runs properly in php3 but failed when it under
php4.............