[PHP-DEV] PHP 4.0 Bug #4658: global parameters in class From: chedong <email protected>
Date: 05/29/00

From: chedong <email protected>
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.............

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>