1$expires = DateTime::createFromFormat('my', $_POST['expMonth'].$_POST['expYear']);
2$now = new DateTime();
3
4if ($expires < $now) {
5 echo 'Expired!';
6}
1$expires = date_format( \DateTime::createFromFormat('ym', $cc_expiration),"ym");
2
3$now = date_format(new \DateTime(),"ym");
4
5if ($expires < $now) {
6 return 'Expired!';
7}