PHP is an open-source scripting language that is mainly used to create dynamic web pages. Its code can be embedded into HTML code which simplifies web page creation. A site designer can ‘jump’ between PHP and HTML without inserting tons of codes to output HTML. The syntax of the language was ‘borrowed’ from C, Java and Perl, though some new features were added. PHP is supported by most of web servers and operating systems.
PHP extensions are used for different purposes with only a few exceptions: Every function in PHP is included into one extension or another. A major number of these extensions are a part of standard extensions – over 400 of them. There is also a PECL repository which offers over 100 additional modules.
Here are the main reasons to use PHP modules/extensions:
You can check the PHP extensions and modules available on our Shared servers in the table below.
Click here to expand the table of modules
If you wish to check the PHP version and PHP extensions enabled for your account, follow this guide for more details. In case some necessary PHP extension or module from the table above is not enabled, feel free to contact our support team via Helpdesk to assist you with this question.
The PHP version (along with PHP extensions) can be changed in a different way depending on the server your account is hosted on:
Here is a brief explanation of each PHP module and extension:
bcompiler: bcompiler enables you to encode your scripts in phpbytecode, enabling you to protect the source code. bcompiler can be used in the following situations: to create an .exe file of a PHP-GTK application (in conjunction with other software); to create closed source libraries; to provide clients with the software expiry time (prior to payment); to deliver close source applications; to use on embedded systems, where disk space is a priority. bcompiler can improve performance by about 30% when used with uncompressed bytecodes only.
bz2_filter: bzip2 compress/decompress stream filter implementation. Performs inline compression/decompression using the bzip2 algorithm on any PHP I/O stream. The data produced by this filter, while compatible with the payload portion of a bz2 file, does not include headers or tailers for full bz2 file compatibility. To achieve this format, use the compress.bzip2:// fopen wrapper built directly into PHP.
crack: this module allows you to use the CrackLib library to test the ‘strength’ of a password. The ‘strength’ of a password is tested based on its length, use of upper and lower case as well as checked against the specified CrackLib dictionary. CrackLib will also give helpful diagnostic messages that will help ‘strengthen’ the password.
curl: PHP supports libcurl, a library created by Daniel Stenberg, that allows you to connect and communicate with different types of servers with different types of protocols. libcurl currently supports http, https, ftp, gopher, telnet, dict, file, and ldap protocols. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP-form based upload, proxies, cookies, and user+password authentication.
enchant: PHP binding for the Enchant library. Enchant steps to provide uniformity and conformity on top of all spelling libraries and implement certain features that may be lacking in any individual provider library.
exif: with the exif extension, you are able to work with image meta data. For example, you may use exif functions to read meta data of pictures taken from digital cameras by working with information stored in the headers of the JPEG and TIFF images.
fileinfo: the functions in this module try to guess the content type and encoding of a file by looking for certain magic byte sequences at specific positions within the file. While this is not a bulletproof approach, the used heuristics do a very good job.
filter: this extension filters data by either validating it or sanitizing it. This is especially useful when the data source contains unknown (or foreign) data, like user supplied input. For example, this data may come from an HTML form.
ftp: the functions in this extension implement client access to files servers speaking the File Transfer Protocol (FTP) as defined in RFC959. This extension is meant for detailed access to an FTP server providing a wide range of control to the executing script.
gd: PHP is not limited to creating just HTML output. It can also be used to create and manipulate image files in a variety of different image formats, including GIF, PNG, JPEG, WBMP, and XPM. Even more convenient, PHP can output image streams directly to a browser. For these purposes PHP is compiled with the GD library.
gender: gender PHP extension is a port of the gender.c program originally written by Joerg Michael. The main purpose is to find out the gender of firstnames. The name dictionary contains >40000 firstnames from 54 countries.
geoip: allows you to find the location of an IP address. City, State, Country, Longitude, Latitude, and other information as all, such as ISP and connection type can be obtained with the help of GeoIP.
gnupg: this module allows you to interact with GnuPG – a complete and free implementation of the OpenPGP standard as defined by RFC4880 (also known as PGP). GnuPG allows to encrypt and sign your data and communication, features a versatile key management system as well as access modules for all kinds of public key directories. GnuPG, also known as GPG, is a command line tool with features for easy integration with other applications. Version 2 of GnuPG also provides support for S/MIME and Secure Shell (ssh). gnupg extension allows you to use the following functions: add a key for decryption/encryption, a key for signing; removes all keys which were set for decryption/encryption before, all keys which were set for signing before; decrypts/encrypts a given text; returns an array with information about all keys that matches the given pattern; toggle armored output; verifies a signed text.
huffman: huffman compression belongs to a family of algorithms with a variable codeword length. That means that individual symbols (characters in a text file for instance) are replaced by bit sequences that have a distinct length. So symbols that occur a lot in a file are given a short sequence while other that are used seldom get a longer bit sequence.
iconv: module contains an interface to iconv character set conversion facility. With this module, you can turn a string represented by a local character set into the one represented by another character set, which may be the Unicode character set.
imagick: is a native php extension to create and modify images using the ImageMagick API. ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG–2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF.
inotify: the inotify extension exposes the inotify functions inotify_init(), inotify_add_watch() and inotify_rm_watch(). inotify_init() returns a stream resource, usable with standard stream functions, like stream_select(), stream_set_blocking() and fclose(). inotify_read() replaces the C way of reading inotify events.
intl: internationalization extension (further is referred as Intl) is a wrapper for ICU library, enabling PHP programmers to perform UCA-conformant collation and date/time/number/currency formatting in their scripts.
ioncube_loader: is a PHP loader used to encrypt PHP files and speed up web pages that are being displayed.
ixed.5.x: is the name of the loaders which are required for encoded scripts protected by SourceGuardian. SourceGuardian 11 is the most advanced PHP Encoder on the market, complete with a ground-up rewrite, a powerful GUI and protection covering the latest version of PHP. You can encode your scripts using Windows, Mac OS X and Linux, all with a powerful GUI or using a command line interface. SourceGuardian PHP Encoder protects your PHP scripts by compiling the PHP source code into a bytecode format, followed by encryption layers.
ldap: is the Lightweight Directory Access Protocol used to access ‘Directory Servers’. The Directory is a special kind of a database that holds information in a tree structure. The concept is similar to your hard disk directory structure, except that in this context, the root directory is ‘The world’ and the first level subdirectories are ‘countries’. Lower levels of the directory structure contain entries for companies, organizations or places, while yet lower still we find directory entries for people, and perhaps equipment or documents.
libxml: these functions/constants are available as of PHP 5.1.0, and the following core extensions rely on this libxml extension: DOM, libxml, SimpleXML, SOAP, WDDX, XSL, XML, XMLReader, XMLRPC and XMLWriter.
magickwand: this module enables PHP access to the ImageMagick MagickWand API. The MagickWand API is the recommended interface between the C programming language and the ImageMagick image processing libraries. Unlike the MagickCore C API, MagickWand uses only a few opaque types.
mailparse: mailparse is an extension for parsing and working with email messages. Mailparse is stream based, which means that it does not keep in–memory copies of the files it processes – so it is very resource efficient when dealing with large messages.
mbstring: mbstring provides multibyte specific string functions that help you deal with multibyte encodings in PHP. In addition to that, mbstring handles character encoding conversion between the possible encoding pairs.
mcrypt: this is an interface to the mcrypt library, which supports a wide variety of block algorithms such as DES, TripleDES, Blowfish (default), 3-WAY, SAFER-SK64, SAFER-SK128, TWOFISH, TEA, RC2 and GOST in CBC, OFB, CFB and ECB cipher modes.
mhash: this function is intended to work with mhash. Mhash can be used to create checksums, message digests, message authentication codes, and more. This is an interface to the mhash library. Mhash supports a wide variety of hash algorithms such as MD5, SHA1, GOST, and many others. For a complete list of supported hashes, refer to the constants page. The general rule is that you can access the hash algorithm from PHP with MHASH_hashname. For example, to access TIGER you use the PHP constant MHASH_TIGER.
mongodb: the MongoDB PHP driver should work on nearly any system: Windows, Mac OS X, Unix, and Linux; little- and big-endian machines; 32- and 64-bit machines; PHP 5.3 through 5.6 (versions prior to 1.6 also support PHP 5.2). Unlike the mongo extension, this extension supports both PHP and HHVM and is developed atop the libmongoc and libbson libraries. It provides a minimal API for core driver functionality: commands, queries, writes, connection management, and BSON serialization. Userland PHP libraries that depend on this extension may provide higher level APIs, such as query builders, individual command helper methods, and GridFS. Application developers should consider using this extension in conjunction with the MongoDB PHP library, which implements the same higher level APIs found in MongoDB drivers for other languages. This separation of concerns allows the driver to focus on essential features for which an extension implementation is paramount for performance.
mssql: this function allows you to access MS SQL Server database. It has the following features: adds a parameter to a stored procedure or a remote stored procedure, close MS SQL Server connection, open MS SQL server connection, moves internal row pointer, executes a stored procedure on a MS SQL server database, fetch a result row as an associative array, a numeric array, or both, returns an associative array of the current row in the result, returns the next batch of records, get field information, fetch row as object, converts a 16 byte binary GUID to a string, initializes a stored procedure or a remote stored procedure, open persistent MS SQL connection etc.
mysql: these functions allow you to access MySQL database servers. This extension is deprecated as of PHP 5.5.0, and has been removed as of PHP 7.0.0. Instead, either the mysqli or PDO_MySQL extension should be used.
mysqlnd: MySQL Native Driver is a replacement for the MySQL Client Library (libmysqlclient). The MySQL database extensions MySQL extension, mysqli and PDO MYSQL all communicate with the MySQL server. With MySQL Native Driver there is now an alternative, as the MySQL database extensions can be compiled to use MySQL Native Driver instead of the MySQL Client Library.
ncurses: (new curses) is a free software emulation of curses in System V Rel 4.0 (and above). It uses terminfo format, supports pads, colors, multiple highlights, form characters and function key mapping.
nd_mysql: MySQL native driver for PHP (mysqlnd) is a drop-in replacement for the MySQL Client Library (libmysql) for the PHP script language. The mysqlnd library is highly optimized for and tightly integrated into PHP. The MySQL Client Library cannot offer the same optimizations because it is a general-purpose client library. The mysqlnd library is using PHP internal C infrastructure for seamless integration into PHP. In addition, it is using PHP memory management, PHP Streams (I/O abstraction) and PHP string handling routines. The use of PHP memory management by mysqlnd allows, for example, memory savings by using read-only variables (copy on write) and makes mysqlnd apply to PHP memory limits
nd_pdo_mysql: MySQL Native Driver is a replacement for the MySQL Client Library (libmysqlclient). MySQL Native Driver is part of the official PHP sources as of PHP 5.3.0. The MySQL database extensions MySQL extension, mysqli and PDO MYSQL all communicate with the MySQL server. In the past, this was done by the extension using the services provided by the MySQL Client Library. The extensions were compiled against the MySQL Client Library in order to use its client-server protocol. With MySQL Native Driver there is now an alternative, as the MySQL database extensions can be compiled to use MySQL Native Driver instead of the MySQL Client Library. MySQL Native Driver is written in C as a PHP extension. Using the MySQL Native Driver offers a number of advantages over using the MySQL Client Library. The older MySQL Client Library was written by MySQL AB (now Oracle Corporation) and so was released under the MySQL license. This ultimately led to MySQL support being disabled by default in PHP. However, the MySQL Native Driver has been developed as part of the PHP project, and is therefore released under the PHP license. This removes licensing issues that have been problematic in the past. Also, in the past, you needed to build the MySQL database extensions against a copy of the MySQL Client Library. This typically meant you needed to have MySQL installed on a machine where you were building the PHP source code. Also, when your PHP application was running, the MySQL database extensions would call down to the MySQL Client library file at run time, so the file needed to be installed on your system. With MySQL Native Driver that is no longer the case as it is included as part of the standard distribution. So you do not need MySQL installed in order to build PHP or run PHP database applications. Because MySQL Native Driver is written as a PHP extension, it is tightly coupled to the workings of PHP. This leads to gains in efficiency, especially when it comes to memory usage, as the driver uses the PHP memory management system. It also supports the PHP memory limit. Using MySQL Native Driver leads to comparable or better performance than using MySQL Client Library, it always ensures the most efficient use of memory. One example of the memory efficiency is the fact that when using the MySQL Client Library, each row is stored in memory twice, whereas with the MySQL Native Driver each row is only stored once in memory.
oauth: this extension provides OAuth 1.0a consumer and provider bindings. OAuth is an authorization protocol built on top of HTTP which allows applications to securely access data without having to store usernames and passwords.
oci8: these functions allow you to access Oracle Database 12c, 11g, 10g, 9i and 8i. They support SQL and PL/SQL statements. Basic features include transaction control, binding of PHP variables to Oracle placeholders, and support for large object (LOB) types and collections. Oracle’s scalability features such as Database Resident Connection Pooling (DRCP) and result caching are also supported.
openssl: this module uses the functions of OpenSSL for generation and verification of signatures and for sealing (encrypting) and opening (decrypting) data. OpenSSL offers many features that this module currently doesn’t support.
pcntl: process control support in PHP implements the Unix style of process creation, program execution, signal handling and process termination. PCNTL now uses ticks as the signal handle callback mechanism, which is much faster than the previous mechanism. This change follows the same semantics as using “user ticks”. You use the declare() statement to specify the locations in your program where callbacks are allowed to occur. This allows you to minimize the overhead of handling asynchronous events. In the past, compiling PHP with pcntl enabled would always incur this overhead, whether or not your script actually used pcntl. There is one adjustment that all pcntl scripts prior to PHP 4.3.0 must make for them to work which is to either to use declare() on a section where you wish to allow callbacks or to just enable it across the entire script using the new global syntax of declare().
pdo: the PHP Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in PHP. Each database driver that implements the PDO interface can expose database–specific features as regular extension functions.
pdo_mysql: is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MySQL 3.x, 4.x and 5.x databases. PDO_MYSQL will take advantage of native prepared statement support present in MySQL 4.1 and higher.
pgsql: PostgreSQL database is an Open Source product. Postgres, developed originally in the UC Berkeley Computer Science Department, pioneered many of the object-relational concepts now becoming available in some commercial databases.
phalcon: phalcon is a high-performance web application framework for PHP based on the model-view-controller (MVC) pattern. Unlike most PHP frameworks, Phalcon is implemented as an extension written in C in order to optimize performance. This is intended to boost execution speed and reduce resource usage with the goal of handling more requests per second than comparable frameworks written primarily in PHP.
phar: the phar extension provides a way to put entire PHP applications into a single file called a ‘phar’ (PHP Archive) for easy distribution and installation. In addition to providing this service, the phar extension also provides a file-format abstraction method for creating and manipulating tar and zip files through the PharData class, much as PDO provides a unified interface for accessing different databases. Phar archives are best characterized as a convenient way to group several files into a single file.
raphf: a reusable split-off of pecl_http’s persistent handle and resource factory API.
radius: this package is based on the libradius (Remote Authentication Dial In User Service) of FreeBSD. It allows clients to perform authentication and accounting by means of network requests to remote servers. This PECL extension adds full support for Radius Authentication (RFC 2865) and Radius Accounting (RFC 2866). This package is available for Unix (tested on FreeBSD and Linux) and for Windows.
rar: PHP extension for reading RAR archives using bundled unRAR library. This extension gives you possibility to read Rar archives but doesn’t support writing Rar archives, because this is not supported by the UnRar library and is directly prohibited by its license.
readline: the readline function implements an interface to the GNU Readline library. These are functions that provide editable command lines. An example being the way Bash allows you to use the arrow keys to insert characters or scroll through command history. Because of the interactive nature of this library, it will be of little use for writing Web applications, but may be useful when writing scripts used from a command line.
reflection: PHP 5 comes with a complete reflection API that adds the ability to reverse’engineer classes, interfaces, functions, methods and extensions. Additionally, the reflection API offers ways to retrieve doc comments for functions, classes and methods.
rsync: this algorithm is using a rolling check-sum and a md4 check’sum for blocks of the file to generate a signature file. The signature file is used to generate a diff from the file on the remote site. This diff can be used on the local site to patch the file.
snmp: Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the health and welfare of network equipment (for example, routers), computer equipment and even devices like UPSs. The SNMP extension provides a very simple and easily usable toolset for managing remote devices via the Simple Network Management Protocol. As it is a wrapper around the underlying Net-SNMP (or UCD-SNMP on older systems) library, all basic concepts are the same and the PHP functions change their behaviour depending on the Net-SNMP configuration files and environment variables. Beginning with PHP 5.4, an OO API is available. SNMP have the following features: retrieve information from an SNMP-capable device, either using single requests or multiple requests, manipulate configuration information on an SNMP-capable device, retrieve a fixed collection of information from an SNMP-capable device, convert between numerical and textual forms of MIB OIDs, and display MIB content and structure.
sockets: the socket extension implements a low–level interface to the socket communication functions based on the popular BSD sockets, providing the possibility to act as a socket server as well as a client.
sourceguardian: this PHP encoder protects your PHP code by compiling the PHP source code into a binary bytecode format, which is then supplemented with an encryption layer.
spl: the Standard PHP Library (SPL) is a collection of interfaces and classes that are meant to solve common problems. SPL provides a set of standard datastructure, a set of iterators to traverse over objects, a set of interfaces, a set of standard Exceptions, a number of classes to work with files and it provides a set of functions like spl_autoload_register().
spl_types: this extension aims at helping people making PHP a stronger typed language and can be a good alternative to scalar type hinting. It provides different typehandling classes as such as integer, float, bool, enum and string.
sqlite: this is an extension for the SQLite Embeddable SQL Database Engine. SQLite is a C library that implements an embeddable SQL database engine. Programs that link with the SQLite library can have SQL database access without running a separate RDBMS process. SQLite is not a client library used to connect to a big database server. SQLite is the server. The SQLite library reads and writes directly to and from the database files on disk.
suhosin: is an advanced protection system for PHP installations. It was designed to protect servers and users from known and unknown flaws in PHP applications and the PHP core. Suhosin comes in two independent parts, that can be used separately or in combination. The first part is a small patch against the PHP core, that implements a few low–level protections against buffer overflows or format string vulnerabilities and the second part is a powerful PHP extension that implements numerous other protections.
sybase_ct: module which gets number of affected rows in last query, closes a Sybase connection, opens a Sybase server connection, moves internal row pointer, sets the deadlock retry count, fetch row as array, fetch a result row as an associative array, gets a result row as an enumerated array, returns the last message from the server
tokenizer: the tokenizer functions provide an interface to the PHP tokenizer embedded in the Zend Engine. Using these functions you may write your own PHP source analyzing or modification tools without having to deal with the language specification at the lexical level.
xmlrpc: XML-RPC is a remote procedure call (RPC) protocol which uses XML to encode its calls and HTTP as a transport mechanism. XML-RPC also refers generically to the use of XML for remote procedure call, independently of the specific protocol. This article is about the protocol named ‘XML-RPC’.
xmlwriter: this extension represents a writer that provides a non-cached, forward-only means of generating streams or files containing XML data.
xrange: xrange is a compiled extension that provides numeric iteration primitives to PHP on top of SPL. It includes a lean numeric range generator/iterator, modeled after Python’s xrange() function. It’s intended to provide an alternative for all numeric iteration and looping.
yaml: this extension implements the YAML Ain’t Markup Language (YAML) data serialization standard. Parsing and emitting are handled by the LibYAML library. YAML is a human friendly data serialization standard for all programming languages.
yaz: this extension offers a PHP interface to the YAZ toolkit that implements the Z39.50 Protocol for Information Retrieval. With this extension you can easily implement a Z39.50 origin (client) that searches or scans Z39.50 targets (servers) in parallel.
zend guard loader: Zend Guard is the most widely accepted PHP encoding and obfuscation product on the market which protects your application from unlicensed use and reverse engineering.
zend_optimizer: allows PHP to run files encoded by Zend Guard which greatly enhances the performance of PHP applications. The Zend Optimizer goes over the code generated by the standard Zend run-time compiler and optimizes it for faster execution.
zlib: this module enables you to transparently read and write gzip (.gz) compressed files, through versions of most of the filesystem functions which work with gzip-compressed files (and uncompressed files, too, but not with sockets).