Posted by www.douglassdavis.com on 09/17/05 12:20
All three of the following classes give "compile-time" errors. It
hinders me from doing what I want to do... And it seems there is no way
around it. But, are each of these cases examples of how the language
should behave? Are any of the examples a case of PHP being
"incorrect?"
class MyClass
{
static $x = 2;
static $y = self::$x; // error
}
class MyClass2
{
var $x = 2;
static $y = $x; // error
}
class MyClass3
{
const a = array(1,2); // error
}
--
http://www.douglassdavis.com/
Navigation:
[Reply to this message]
|