Last active
August 29, 2015 14:17
-
-
Save joshkoenig/6c3d7bbb164e2d13526d to your computer and use it in GitHub Desktop.
How to make people aware of why something might not work.
This file contains hidden or 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 | |
# Making use of: http://php.net/manual/en/function.phpversion.php | |
# | |
# The idea is you'd stick this in your core class at the top to prevent execution | |
# on out-dated runtime environments. | |
# | |
# You could use 50300 if you only care about 5.3, but it's EOL too, so... | |
if (!defined('PHP_VERSION_ID')) || PHP_VERSION_ID < 50400) { | |
# Inform users they need to upgrade their PHP version (or have their host do so) | |
# It'd be great if there was a common message or link to send users. | |
# Don't let anything else execute. | |
return; | |
} | |
# Your normal code starts here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment