mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-02-05 05:18:28 +00:00
Crypt/Base: simplify logic using de morgan's law
This commit is contained in:
parent
f404932895
commit
df1203f651
@ -514,11 +514,13 @@ abstract class Base
|
|||||||
switch (true) {
|
switch (true) {
|
||||||
// PHP_OS & "\xDF\xDF\xDF" == strtoupper(substr(PHP_OS, 0, 3)), but a lot faster
|
// PHP_OS & "\xDF\xDF\xDF" == strtoupper(substr(PHP_OS, 0, 3)), but a lot faster
|
||||||
case (PHP_OS & "\xDF\xDF\xDF") === 'WIN':
|
case (PHP_OS & "\xDF\xDF\xDF") === 'WIN':
|
||||||
case !(function_exists('php_uname') && is_string(php_uname('m')) && (php_uname('m') & "\xDF\xDF\xDF") == 'ARM'):
|
case !function_exists('php_uname'):
|
||||||
|
case !is_string(php_uname('m')):
|
||||||
|
case (php_uname('m') & "\xDF\xDF\xDF") != 'ARM':
|
||||||
case PHP_INT_SIZE == 8:
|
case PHP_INT_SIZE == 8:
|
||||||
define('CRYPT_BASE_USE_REG_INTVAL', true);
|
define('CRYPT_BASE_USE_REG_INTVAL', true);
|
||||||
break;
|
break;
|
||||||
case is_string(php_uname('m')) && (php_uname('m') & "\xDF\xDF\xDF") == 'ARM':
|
case (php_uname('m') & "\xDF\xDF\xDF") == 'ARM':
|
||||||
switch (true) {
|
switch (true) {
|
||||||
/* PHP 7.0.0 introduced a bug that affected 32-bit ARM processors:
|
/* PHP 7.0.0 introduced a bug that affected 32-bit ARM processors:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user