Parse error: syntax error, unexpected T_FUNCTION, expecting T_STRING in /var/www/include/functions.php on line 2
I get this error when I run this file.
class Function
{
function email_check($email){
if(preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/", $email)){
list($email)=split('@',$email);
if(!checkdnsrr($email,'MX')) {
return false;
}
return true;
}
return false;
}
};
$function = new Function;
Anyone know why i am getting this error??