In this article we will learn about some of the frequently asked Php programming questions in technical like PHP Quick Tip: How to check loaded extensions on CLI. When creating scripts and web applications, error handling is an important part. If your code lacks error checking code, your program may look very unprofessional and you may be open to security risks. Error handling in PHP is simple. An error message with filename, line number and a message describing the error is sent to the browser. This tutorial contains some of the most common error checking methods in PHP. Below are some solution about PHP Quick Tip: How to check loaded extensions on CLI.
Suppose we have PHP installed on our machine and we want to quick check what extensions loaded on our PHP. Plus you just want to know through CLI. It’s easy.
Usually I just type this.
It will display complete information about PHP and all its configuration. It is similar like we call
The second is typing this command.
php -r "print_r(get_loaded_extensions());"
It will display loaded extensions only. The result example is like below.
Array (  => Core  => date  => libxml  => openssl  => pcre  => zlib  => filter  => hash  => pcntl  => Reflection  => SPL  => sodium  => session  => standard  => mysqlnd  => PDO  => xml  => bcmath  => calendar  => ctype  => curl  => dom  => mbstring  => fileinfo  => ftp  => gd  => gettext  => iconv  => igbinary  => imap  => json  => exif  => msgpack  => mysqli  => pdo_mysql  => Phar  => posix  => readline  => shmop  => SimpleXML  => sockets  => sysvmsg  => sysvsem  => sysvshm  => tokenizer  => wddx  => xmlreader  => xmlwriter  => xsl  => memcached  => Zend OPcache )
Thank you and I hope you enjoy it.
- Cover image Pencil Shred by Pixabay from https://www.pexels.com/photo/cake-candy-celebration-chocolate-261738/