From 3ae672f0fcc71ec8d7a0c37c4b505e8c8310e42c Mon Sep 17 00:00:00 2001 From: Sergey Romanenko Date: Sat, 15 Oct 2022 19:20:51 +0400 Subject: [PATCH] add version_compare --- html-minifier.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/html-minifier.php b/html-minifier.php index 9c44a29..9373db0 100644 --- a/html-minifier.php +++ b/html-minifier.php @@ -17,6 +17,8 @@ require_once $autoload; +version_compare($ver = PHP_VERSION, $req = '7.1.3', '<') and exit(sprintf('You are running PHP %s, but plugin needs at least PHP %s to run.', $ver, $req)); + class HtmlMinifier { private static array $options = [];