What Can PHP Do?

PHP is mainly focused on three main areas

  1. Server-side scripting
  2. Command-line scripting
  3. Writing desktop applications

Server-side scripting

  • This is the main target field of PHP. 
  • You need three things to use.
    1. PHP Parser
    2. A Web browser
    3. A Webserver
  • You need to install the PHP and run the webserver with connected PHP Installation.
  • Using a web browser, you can access PHP Output.
  • The PHP page is viewing through a server.

Command-line scripting

  • You can run PHP scripts without using a web browser or any server.
  • These scripts are mainly used for simple text processing tasks.

Writing desktop applications

  • PHP is not good for developing desktop applications with a graphical user interface.
  • You can use PHP-GTK for such applications.
  • It is not available in the main distribution. It is an extension to the PHP.
  • PHP can be used on all major operating systems like Microsoft Windows, Unix variants, Linux, macOS.
  • PHP has support from most of the web servers like Apache, IIS and many others.
  • In PHP, you have freedom of choosing object-oriented programming(OOP), procedural oriented programming or mixture of them both.

Wide range of databases

  • PHP Supports a wide range of databases like MySQL or connects to any database supporting the Open Database Connection standard. 

Text processing features

  • PHP also has text processing features like Perl compatible regular expressions (PCRE), and many extensions and tools to parse and access XML documents.
  • PHP extends the feature set adding the support for XMLWriter, XMLReader and SimpleXML.