(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 expansion(s).
例1 A rpmexpand() example
<?php
$distro = rpmexpand("%{?fedora:Fedora %{fedora}}%{?rhel:Enterprise Linux %{rhel}}");
print_r($distro);
?>
上の例の出力は以下となります。
Fedora 41