3 namespace OpenEMR\Common\Compatibility
;
6 * Check if the server's PHP version is compatible with OpenEMR.
8 * Note that this will only be used within setup.php, sql_upgrade.php,
9 * sql_patch.php, acl_upgrade.php, admin.php, and globals.php.
12 * @author Matthew Vita <matthewvita48@gmail.com>
13 * @link http://www.open-emr.org
14 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
15 * @copyright Copyright (c) 2017 Matthew Vita
19 private static $minimumPhpVersion = "8.1.0";
22 * Checks to see if minimum PHP version is met.
24 * @return bool | warning string
26 public static function checkPhpVersion()
28 $phpCheck = self
::isPhpSupported();
32 $response .= "PHP version needs to be at least" . " " . self
::$minimumPhpVersion . ".";
41 * Checks to see if minimum PHP version is met.
45 private static function isPhpSupported()
47 return version_compare(phpversion(), self
::$minimumPhpVersion, ">=");