Richard Lynch schreef:
Is there any reason why the logic behind define() couldn't be pushed down to
class const?
probably no reason why it couldn't but from what I gather there is a specific
reason wht it works like this: speed.
const is compile time, define is runtime
IIRC const was made th
Is there any reason why the logic behind define() couldn't be pushed down to
class const?
Code like this is kinda fugly:
//It's okay here, but not in a class?
define('CACHE_DIR_LONG', CONFIG_ROOT_PATH . '/cache/');
class Cache {
const CACHE_DIR = '/dev/shm/cache/';
const CACHE_TTL = 300; //
2 matches
Mail list logo