php8.5
Home/ Manual/ rpminfo / functions/ rpmexpandnumeric

rpmexpandnumeric

PHP function Edit on GitHub ✎

(PECL rpminfo >= 1.2.0)

Retrieve numerical value of a RPM macro

Description

rpmexpandnumeric(string $text): int

Retrieve numerical value of a RPM macro.

Parameters

text

Text with RPM macros to expand.

Return Values

Macro expansion as a int. Boolean values (Y or y returns 1, N or n returns 0) are permitted as well. An undefined macro returns 0.

Examples

A rpmexpandnumeric() example

php
<?php
$bits = rpmexpandnumeric("%__isa_bits");
print_r($bits);
?>

The above example will output:

output
64

See Also

Source: reference/rpminfo/functions/rpmexpandnumeric.xml · from the official PHP manual (php/doc-en)