How can I check if a variable is a datetime type on php, please? I've tried this, but it seems doesn't work.
public function setRegistrationDate ($registrationDate) {
   if (!is_date($registrationDate, "dd/mm/yyyy hh:mm:ss")) {
       trigger_error('registrationDate != DateTime', E_USER_WARNING);
       return;
   }
   $this->_registrationDate = $registrationDate;
}
 
     
     
     
     
     
    