rpmexpand
(PECL rpminfo >= 1.2.0)
rpmexpand — Retrieve expanded value of a RPM macro
参数
text- Text with RPM macros to expand.
返回值
A string with concatenated macro expansions.
示例
示例 #1 A rpmexpand() example
<?php
$distro = rpmexpand("%{?fedora:Fedora %{fedora}}%{?rhel:Enterprise Linux %{rhel}}");
print_r($distro);
?>以上示例会输出:
Fedora 41
参见
- rpmexpandnumeric() - Retrieve numerical value of a RPM macro