mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
string
This commit is contained in:
parent
2d409db2f9
commit
effefd4844
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user