Linux widely uses operating system in the server side and client side. Operating system provides flexible options to install our custom packages and extensions based on our project requirement. Additionally, we can write our own shell scripts to automate our projects.
PHP is used mainly in server-side application software along with various add-ons. During the project development, we must do the basic configuration testing. (e.g relevant packages installed, php.ini configuration, etc.,).
Here, we describe the process that how to find out available / installed PHP extension and packages in the Linux system. It is a very simple process if you use the below command.
php -m
It will list out all installed PHP extension lines by line.
You can check the example output below:

Note: ‘sudo‘ permission is not necessary to execute this command.

Related Posts
-
Linux command to list out all installed fonts: fc-listfc-list lists fonts and styles available on the system using fontconfig. You can use fc-list to find out whether particular language font is installed or not. In this tutorial, I will show you how to list all installed fonts and also how to list installed fonts for a particular language…
-
Find out what Perl modules already installed on Linux SystemUse 'instmodsh' command to get a complete list of installed Perl modules on your Linux system and it provides an interactive shell type interface to query details of locally installed Perl modules. Open your terminal and type the following command: instmodsh Now, you will get the list of available commands…
-
Generating Random String Using PHPGenerating random strings with custom specified length is most required functionality in every project. In this article, I described the easiest way to generate custom length random string. PHP program for Random String Generate: <?php /* * Function to generate random string * Default length 30 character */ function generateRandomString($length…
How to add and subtracting days using php date functionPHP date() function formats a local date and time, and returns the formatted date string. In this article, I described the simple process about how to add and subtract number of days from current date using default PHP date() function. Add number of days in current date: php strtotime add…
-
PHP: Create empty object - new stdClass,var_dumpstdClass is the default PHP object. stdClass has no properties, methods or parent. It does not support magic methods, and implements no interfaces. Standard way to create an "empty" object is: <?php $input_object = new stdClass(); var_dump($input_object); ?> Result for new stdClass(): object(stdClass)#1 (0) { } But, with PHP Version…
How to add and subtracting weeks using php date() functionPHP date() function formats a local date and time, and returns the formatted date string. In this article, I described the simple process about how to add and subtract number of weeks from current date using default PHP date() function. Add number of weeks in current date: (Example: adding 5 weeks) <?php…
Get the last element of an array in PHP – end()The end() function is an inbuilt function in PHP Programming. The purpose of this function is to find the last element of the given input array. The end() function changes the internal pointer of an array to the last element and returns the value of the last element. end() PHP…
cal - How to get monthly and yearly calendar in LinuxThe "cal" command displays a simple calendar with Linux / UNIX date and time. If no argument passed, then the current month is displayed. Month can specified as a number from 1 to 12. "cal" command without argument to get monthly calendar: Monthly calendar "cal" command with argument to get…
-
PHP: How to copy all files from one directory to anotherI will guide you to copy all files & sub directories of the directory to another directory using PHP copy() function. There are many other functions used to copy the content of one directory to another. copy() Functionopendir() Functionis_dir() Functionscandir( ) Functionreaddir() Function PHP code for copy multiple files from…
-
cd command in Linux / Unix'cd' is a Linux command to change the current working directory or folder of the terminal (Shell). Syntax: # cd [directory / folder name] cd: cd [-L|[-P [-e]]] [dir] Change the shell working directory. Change the current directory to DIR. The default DIR is the value of the…
Thank you for this tip.