How To Install php-zend-code on Debian 9

In this tutorial we learn how to install php-zend-code on Debian 9. php-zend-code is Zend Framework - Code component

Introduction

In this tutorial we learn how to install php-zend-code on Debian 9.

What is php-zend-code

php-zend-code is:

Zend\Code\Generator provides facilities to generate arbitrary code using an object oriented interface, both to create new code as well as to update existing code. While the current implementation is limited to generating PHP code, you can easily extend the base class in order to provide code generation for other tasks: JavaScript, configuration files, Apache Virtual Hosts,?etc.

Zend is a PHP framework for developing web applications and services.

There are three methods to install php-zend-code on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install php-zend-code Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install php-zend-code using apt-get by running the following command:

sudo apt-get -y install php-zend-code

Install php-zend-code Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install php-zend-code using apt by running the following command:

sudo apt -y install php-zend-code

Install php-zend-code Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install php-zend-code using aptitude by running the following command:

sudo aptitude -y install php-zend-code

How To Uninstall php-zend-code on Debian 9

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

sudo apt-get remove php-zend-code

Uninstall php-zend-code And Its Dependencies

To uninstall php-zend-code and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove php-zend-code

Remove php-zend-code Configurations and Data

To remove php-zend-code configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge php-zend-code

Remove php-zend-code configuration, data, and all of its dependencies

We can use the following command to remove php-zend-code configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge php-zend-code

Dependencies

php-zend-code have the following dependencies:

References

Summary

In this tutorial we learn how to install php-zend-code package on Debian 9 using different package management tools: apt, apt-get and aptitude.