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

参见