« rpmdefine
rpmexpandnumeric »

rpmexpand

(PECL rpminfo >= 1.2.0)

rpmexpand — Retrieve expanded value of a RPM macro

説明

function rpmexpand(string $text): string

Retrieve expanded value of a RPM macro.

パラメータ

text

Text with RPM macros to expand.

戻り値

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

参考

関連キーワード:
macro   Retrieve   rpmexpand   rpmexpandnumeric   text   distro   fedora   Fedora   rhel   rpmdefine   RpmInfo   rpminfo   Text   macros   numerical
関連する関数・ページ:
function.rpmexpandnumeric   ref.rpminfo   book.rpminfo   function.rpmdefine   parle-lexer.insertmacro   parle-rlexer.insertmacro