rpanning
05-20-2004, 06:07 PM
Ok, I'm trying to concat a class var but still cannot. I know it's not possible in version 4 as the docs (http://us2.php.net/manual/en/language.oop.php#keyword.class) say so (third gray box down).. I though maybe it would work in PHP 5 but it's still a no go. Just though someone may know of a workaround or why this is not possible..?? I'm trying to do:
<?php
define('CONST_EX', 'test');
class Test {
// I want this to be 'testtest'
static $example = CONST_EX.'test';
}
// Should print testtest
print(Test::$example);
?>
<?php
define('CONST_EX', 'test');
class Test {
// I want this to be 'testtest'
static $example = CONST_EX.'test';
}
// Should print testtest
print(Test::$example);
?>