Re[8]: Need a more elegant way of bitwise ORing values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Robert,

Wednesday, June 13, 2007, 3:37:38 PM, you wrote:

> Personally I hate constants (can't use non-scalar values so why get used
> ot them... also they're just another point for name collision) so if it
> were my own code I'd do something more like the following:

Sure, but the filter extension uses them, which is where they come
from. They aren't of my own creation, and I cannot assume that the
values assigned to them won't change in the future, so can't hardcode
my way around them.

I don't have anything against side-wide constants myself (no worse
than an array shoved into $GLOBALS) but PHP seems to be moving more
and more towards the use of constants within extensions as function
parameters, PDO being another popular culprit that springs to mind.

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

"Never trust a computer you can't throw out of a window"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux