(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