mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-09 01:45:36 +08:00
string
This commit is contained in:
@@ -100,7 +100,7 @@ class SPCTarget
|
|||||||
public static function getLibcVersion(): ?string
|
public static function getLibcVersion(): ?string
|
||||||
{
|
{
|
||||||
if (PHP_OS_FAMILY === 'Linux') {
|
if (PHP_OS_FAMILY === 'Linux') {
|
||||||
$target = getenv('SPC_TARGET');
|
$target = (string) getenv('SPC_TARGET');
|
||||||
if (str_contains($target, '-gnu.2.')) {
|
if (str_contains($target, '-gnu.2.')) {
|
||||||
return preg_match('/-gnu\.(2\.\d+)/', $target, $matches) ? $matches[1] : null;
|
return preg_match('/-gnu\.(2\.\d+)/', $target, $matches) ? $matches[1] : null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user