diff --git a/src/Key/Derivation/Scrypt.php b/src/Key/Derivation/Scrypt.php index af04a4c..e5ff55b 100644 --- a/src/Key/Derivation/Scrypt.php +++ b/src/Key/Derivation/Scrypt.php @@ -329,7 +329,7 @@ protected static function integerify($b) */ protected static function hex2bin($hex) { - if (version_compare(PHP_VERSION, '5.4') >= 0) { + if (PHP_VERSION_ID >= 50400) { return hex2bin($hex); } $len = strlen($hex); diff --git a/src/Password/Bcrypt.php b/src/Password/Bcrypt.php index 8dfa3cb..bd7a519 100644 --- a/src/Password/Bcrypt.php +++ b/src/Password/Bcrypt.php @@ -83,7 +83,7 @@ public function create($password) * Check for security flaw in the bcrypt implementation used by crypt() * @see http://php.net/security/crypt_blowfish.php */ - if ((version_compare(PHP_VERSION, '5.3.7') >= 0) && !$this->backwardCompatibility) { + if ((PHP_VERSION_ID >= 50307) && !$this->backwardCompatibility) { $prefix = '$2y$'; } else { $prefix = '$2a$';