How To Install php-ast on Fedora 36

In this tutorial we learn how to install php-ast in Fedora 36. php-ast is Abstract Syntax Tree

Introduction

In this tutorial we learn how to install php-ast on Fedora 36.

What is php-ast

This extension exposes the abstract syntax tree generated by PHP 7.

We can use yum or dnf to install php-ast on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install php-ast.

Install php-ast on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install php-ast using dnf by running the following command:

sudo dnf -y install php-ast

Install php-ast on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install php-ast using yum by running the following command:

sudo yum -y install php-ast

How To Uninstall php-ast on Fedora 36

To uninstall only the php-ast package we can use the following command:

sudo dnf remove php-ast

php-ast Package Contents on Fedora 36

/etc/php-zts.d/40-ast.ini
/etc/php.d/40-ast.ini
/usr/lib/.build-id
/usr/lib/.build-id/2c
/usr/lib/.build-id/2c/7cd7559aff78fc846c0ddfebdae54b6f76c09f
/usr/lib/.build-id/53
/usr/lib/.build-id/53/4181d34a26bf55df22b513cf1350965e4de8ef
/usr/lib64/php-zts/modules/ast.so
/usr/lib64/php/modules/ast.so
/usr/share/doc/pecl/ast
/usr/share/doc/pecl/ast/README.md
/usr/share/doc/pecl/ast/ast_stub.php
/usr/share/doc/pecl/ast/util.php
/usr/share/licenses/php-ast
/usr/share/licenses/php-ast/LICENSE
/var/lib/php/peclxml/php-ast.xml

References

Summary

In this tutorial we learn how to install php-ast on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).