PHP Traits Explanation with Example

PHP Traits

PHP Traits

PHP 5.4 introduces the concept of traits. In PHP 5.4 version several new features was introduced, one such feature was PHP traits.

PHP traits help us to minimize code duplication in our codebase. Until the concept of traits, PHP uses classical inheritance model in which one class can inherit only one class. But sometimes, it is beneficial to inherit from multiple classes to avoid code duplication. To solve this problem, PHP community introduces the concept of traits.

Install,Uninstall,Remove,Update Package through apt-get in Ubuntu

In this article, i’ll explain what is apt-get utility, how to install,uninstall,remove,update package through apt-get in Ubuntu.

What is apt-get

apt-get is a powerful command-line tool used for package management in Debian Linux distribution. It used to work with Ubuntu’s APT (Advanced Packaging Tool) library to Install/manage individual packages , Remove installed package, Upgrade packages etc.