redefine constant in extended class
Posted: Fri Apr 03, 2009 2:58 pm
hi. i am extending a class that has a regex 'define' 'd in the parent class. I am wondering how i can 'redefine' that constant in my new class....is that possible? If so, is that correct below? Does not seem to be...
Code: Select all
define('VALID_EMAIL', "/regex_stuff/");
class ParentClass
{
//class stuff
}
define('VALID_EMAIL', "/different_regex_stuff/");
class ChildClass extends ParentClass
{
//do similar stuff
}