How can I access a static variable in a separate class in PHP? Is the scope resolution operator the wrong tool for the job? Example:
class DB {
static $conn = 'Connection';
}
class User {
function __construct() {
DB::conn; //throws "Undefined class constant 'conn' error.
}
}