Created
August 20, 2017 20:15
-
-
Save daum/da680e5bac8a00a96038fab2f43f0c92 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 | |
// Generate the start timestamp | |
$start = time(); | |
// Do other stuff.... | |
// If the end timestamp is over 7 weeks in seconds throw an error | |
if( strtotime('+7 days') - $start > 86400) { | |
throw new \Exception('must be less than 7 weeks'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment