PHP 8.4.2 Released!

rpmexpand

(PECL rpminfo >= 1.2.0)

rpmexpandRetrieve expanded value of a RPM macro

说明

rpmexpand(string $text): string

Retrieve expanded value of a RPM macro.

参数

text

Text with RPM macros to expand.

返回值

A string with concatenated macro expansion(s).

示例

示例 #1 A rpmexpand() example

<?php
$distro
= rpmexpand("%{?fedora:Fedora %{fedora}}%{?rhel:Enterprise Linux %{rhel}}");
print_r($distro);
?>

以上示例会输出:

Fedora 41

参见

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。
To Top