original_string: public function validateDate($date)
      {
          $subs = null;
          $check1 = preg_match("/^([\d]{4})-([\d]{2})-([\d]{2})$/i", $date, $subs);
          if(!$check1) {
              return false;
          }
          return checkdate($subs[2], $subs[3], $subs[1]);
      }
code: public function validateDate($date)
      {
          $subs = null;
          $check1 = preg_match("/^([\d]{4})-([\d]{2})-([\d]{2})$/i", $date, $subs);
          if(!$check1) {
              return false;
          }
          return checkdate($subs[2], $subs[3], $subs[1]);
      }
code_tokens: public function validateDate ( $ date ) { $ subs = null ; $ check1 = preg_match ( "/^([\d]{4})-([\d]{2})-([\d]{2})$/i" , $ date , $ subs ) ; if ( ! $ check1 ) { return false ; } return checkdate ( $ subs [ 2 ] , $ subs [ 3 ] , $ subs [ 1 ] ) ; }
docstring: Validate date format
  @param $date
  @return bool
docstring_tokens: Validate date format