(PECL rpminfo >= 1.2.0)
rpmexpand — Retrieve expanded value of a RPM macro
text
A string with concatenated macro expansions.
Example #1 A rpmexpand() example
<?php
$distro = rpmexpand("%{?fedora:Fedora %{fedora}}%{?rhel:Enterprise Linux %{rhel}}");
print_r($distro);
?>
The above example will output:
Fedora 41