Created
January 6, 2019 22:14
-
-
Save ProdigyView/a39008d14764de6e0a31305ab39b85bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function hasExpired(string $token, array $tokens, int $current_time) : bool { | |
if(!isset($tokens[$token])) { | |
return true; | |
} | |
if($tokens[$token]['expiration'] < $current_time) { | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment