PHP - Manual: rpmexpand
2025-02-27
(PECL rpminfo >= 1.2.0)
rpmexpand — Retrieve expanded value of a RPM macro
text
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