Hello Stanislav, nothing really. I only think that it is easier to have the consts in the namespace then in an extra class. I probably would call the class 'Config' or 'Setup' or alike then. But if i'd do that i'd be missing features like static classes.... the php workaround would be 'abstract final class'. Only:
[EMAIL PROTECTED] /usr/src/php-cvs $ php -r 'abstract final class Config { const XXX = 42; }' make: `sapi/cli/php' is up to date. Parse error: syntax error, unexpected T_FINAL, expecting T_CLASS in Command line code on line 1 regards marcus Monday, November 28, 2005, 9:00:02 PM, you wrote: MB>>>namespace Foo MB>>>{ > class Behaviour { MB>>> const XYZ = 42; > } MB>>> class Bar MB>>> { MB>>> const XXXX = Foo::XYZ; > const XXXX = Behaviour::XYZ; MB>>> //... MB>>> } > etc. What's wrong with that? Except for the fact that now you can move > these classes to another namespace if you wanted to and need not to > hardcode namespace name in each class? :) > -- > Stanislav Malyshev, Zend Products Engineer > [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php