How to make sure PHP version is above a certain version in order to run code? -
i'm making script used on multitude of servers, in install file, need find version server running file can determine whether or not install script.
instead of using array versions allowed , running through loop see if matches, what's easier way create sure they're running new plenty version of php?
run check between current version , whatever version requirement have.
define("required_version", "5.5.13"); if(!version_compare(php_version, required_version, "<")) { // current php version < required version }
php version
No comments:
Post a Comment