mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Utils: eliminate usages of backtick operator
This commit is contained in:
parent
d5f13d8be2
commit
0f0b6f0efa
@ -71,6 +71,7 @@ use function rmdir;
|
|||||||
use function rtrim;
|
use function rtrim;
|
||||||
use function scandir;
|
use function scandir;
|
||||||
use function sha1;
|
use function sha1;
|
||||||
|
use function shell_exec;
|
||||||
use function spl_object_hash;
|
use function spl_object_hash;
|
||||||
use function str_pad;
|
use function str_pad;
|
||||||
use function str_replace;
|
use function str_replace;
|
||||||
@ -235,7 +236,7 @@ class Utils{
|
|||||||
}elseif($os === Utils::OS_ANDROID){
|
}elseif($os === Utils::OS_ANDROID){
|
||||||
$machine .= @file_get_contents("/system/build.prop");
|
$machine .= @file_get_contents("/system/build.prop");
|
||||||
}elseif($os === Utils::OS_MACOS){
|
}elseif($os === Utils::OS_MACOS){
|
||||||
$machine .= `system_profiler SPHardwareDataType | grep UUID`;
|
$machine .= shell_exec("system_profiler SPHardwareDataType | grep UUID");
|
||||||
}
|
}
|
||||||
$data = $machine . PHP_MAXPATHLEN;
|
$data = $machine . PHP_MAXPATHLEN;
|
||||||
$data .= PHP_INT_MAX;
|
$data .= PHP_INT_MAX;
|
||||||
@ -358,7 +359,7 @@ class Utils{
|
|||||||
break;
|
break;
|
||||||
case Utils::OS_BSD:
|
case Utils::OS_BSD:
|
||||||
case Utils::OS_MACOS:
|
case Utils::OS_MACOS:
|
||||||
$processors = (int) `sysctl -n hw.ncpu`;
|
$processors = (int) shell_exec("sysctl -n hw.ncpu");
|
||||||
break;
|
break;
|
||||||
case Utils::OS_WINDOWS:
|
case Utils::OS_WINDOWS:
|
||||||
$processors = (int) getenv("NUMBER_OF_PROCESSORS");
|
$processors = (int) getenv("NUMBER_OF_PROCESSORS");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user