rpmexpand
(PECL rpminfo >= 1.2.0)
rpmexpand — Retrieve expanded value of a RPM macro
Parameters
text
Text with RPM macros to expand.
Return Values
A string with concatenated macro expansions.
Examples
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
See Also
- rpmexpandnumeric() - Retrieve numerical value of a RPM macro
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
