Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#4980 from BinaryKitten…
Browse files Browse the repository at this point in the history
…/version_check_update

change of version checks to use PHP_VERSION_ID constant.
  • Loading branch information
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Rand.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static function getBytes($length, $strong = false)
}
$bytes = '';
if (function_exists('openssl_random_pseudo_bytes')
&& (version_compare(PHP_VERSION, '5.3.4') >= 0
&& ((PHP_VERSION_ID >= 50304)
|| strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')
) {
$bytes = openssl_random_pseudo_bytes($length, $usable);
Expand All @@ -50,7 +50,7 @@ public static function getBytes($length, $strong = false)
}
}
if (function_exists('mcrypt_create_iv')
&& (version_compare(PHP_VERSION, '5.3.7') >= 0
&& ((PHP_VERSION_ID >= 50307)
|| strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')
) {
$bytes = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM);
Expand Down

0 comments on commit 5ec9258

Please sign in to comment.