mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-09-27 14:49:04 +00:00
Crypt/Base: improve ARM detection code
This commit is contained in:
parent
6cd6e8ceab
commit
173bb38e67
@ -537,13 +537,13 @@ class Crypt_Base
|
||||
if (!defined('CRYPT_BASE_USE_REG_INTVAL')) {
|
||||
switch (true) {
|
||||
// PHP 5.3, per http://php.net/releases/5_3_0.php, introduced "more consistent float rounding"
|
||||
case version_compare(PHP_VERSION, '5.3.0') >= 0 && (php_uname('m') & "\xDF\xDF\xDF") != 'ARM':
|
||||
case version_compare(PHP_VERSION, '5.3.0') >= 0 && !(is_string(php_uname('m')) && (php_uname('m') & "\xDF\xDF\xDF") == 'ARM'):
|
||||
// PHP_OS & "\xDF\xDF\xDF" == strtoupper(substr(PHP_OS, 0, 3)), but a lot faster
|
||||
case (PHP_OS & "\xDF\xDF\xDF") === 'WIN':
|
||||
case PHP_INT_SIZE == 8:
|
||||
define('CRYPT_BASE_USE_REG_INTVAL', true);
|
||||
break;
|
||||
case (php_uname('m') & "\xDF\xDF\xDF") == 'ARM':
|
||||
case is_string(php_uname('m')) && (php_uname('m') & "\xDF\xDF\xDF") == 'ARM':
|
||||
switch (true) {
|
||||
// PHP_VERSION_ID wasn't a constant until PHP 5.2.7
|
||||
case version_compare(PHP_VERSION, '5.3.0') < 1:
|
||||
|
Loading…
Reference in New Issue
Block a user