[PHP-DEV] PHP 4.0 Bug #4658 Updated: global parameters in class From: Bug Database (php-dev <email protected>)
Date: 05/29/00

ID: 4658
Updated by: sterling
Reported By: chedong <email protected>
Status: Closed
Bug Type: Other
Assigned To:
Comments:

Quoth the incompatibilities list:

  Static variable and class member initializers only accept scalar values (in PHP
  3.0 they accepted any valid expression). The impact should be small, since
  initializers with anything but a simple static value rarely make sense.

A workaround is to create a constructor that sets the value of $test:

class test
{
  var $test;
  function test ()
  {
    $this->test = $PHP_SELF;
  }
}

Full Bug description available at: http://bugs.php.net/version4/?id=4658

-- 
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>