What is the use of PHP

PHP(Hypertext Preprocessor)

PHP (Hypertext preprocessor) is a general-purpose scripting language that is mainly suited to server-side web development, in which case PHP normally runs on a web server. Any PHP code in a requested file is executed by the PHP runtime, mainly to create dynamic web page content or dynamic images used on websites or elsewhere.

PHP code may be embedded into HTML code, or it can be used in combination with many web template systems, web content management systems, and web frameworks.

PHP (HyperText Preprocessor )

PHP(Hypertext Preprocessorcode is mainly processed by a PHP interpreter implemented as a module in the web server or as a Common Gateway Interface (CGI) executable.

The web server adds the results of the interpreted and executed PHP code, which may be any type of data, including images, with the generated web page. PHP code may also be implemented with a command-line interface (CLI) and can be used to implement standalone graphical applications.

PHP Introduction

PHP scripts are executed on the server.

What You Should Already Know

Before you introduce you should have a basic knowledge of the following:

  • HTML
  • CSS
  • JavaScript

What is a PHP File?

  • PHP files can hold1text, HTML, CSS, JavaScript, and PHP code
  • PHP code are implement on the server, and the result is returned to the browser as plain HTML
  • PHP files have extension “.php”

What Can PHP Do?

  • PHP can generate dynamic page content
  • PHP language can create, open, read, write, delete, and close files on the server.
  • PHP can collect form data.
  • PHP can send and receive cookies
  • PHP language can change, add, delete, modify data in your database.
  • PHP can be used to control user-access.
  • PHP can encrypt data.

With PHP language  you are not limited to result HTML. You can output PDF files, images and even Flash movies. You can also product any text, such as XHTML and XML.

Use of PHP?

  • PHP runs on many platforms (Windows, Linux, Unix, Mac OS X, etc.)
  • PHP is compatible with almost all servers used today like (Apache, IIS, etc.)
  • PHP supports a wide range of databases.
  • PHP is free. Download it from the official PHP resource: www.php.net
  • PHP language is easy to understand and runs efficiently on the server side.

The fact that PHP was not normally designed, but instead was developed organically has led to inconsistent naming of functions and inconsistent ordering of their parameters. In some cases, the PHP function names were chosen to match the lower-level libraries, while in some very early versions of PHP the length of the function names was used intellectual as a hash function, so names were chosen to improve the distribution of hash values.

PHP 3 and 4

Zeev Suraski and Andi Gutmans rewrote the parser in 1997 and formed the base of PHP 3, changing the language’s name to the periodic acronym

PHP: Hypertext Preprocessor, eventually, public testing of PHP 3 began, and the official launch came in June 1998.

PHP 5

PHP 5 included new characteristic such as improved support for object-oriented programming(OOPS), the PHP Data Objects (PDO) extension (which defines a lightweight and consistent interface for obtain databases), and many performance improvement. Late static irrevocable had been missing from PHP and was added in version 5.3.

PHP 6 and Unicode

PHP received mixed enquiry due to lacking native Unicode support at the core language level. In 2005, a project headed by Andrei Zmievski was begin to bring native Unicode support throughout PHP, by embedding the International Components for Unicode (ICU) library, and representing text strings as UTF-16 internally.

Since this would cause bigger changes both to the internals of the language and to user code, it was planned to release this as version 6.0 of the language, along with other major features then in development.

PHP 7

A new biggest PHP version was developed, which was numbered PHP 7. The numbering of this version involved some debate. While the PHP 6 Unicode experiment had never been updated, many articles and book titles referenced the PHP 6 name, which might have caused confusion if a new release were to reprocess the name. After a vote, PHP 7 was chosen.

Because of biggest internal changes in phpng, it must receive a new major version number of PHP, rather than a minor PHP 5 release, according to PHP’s release process.Major versions of PHP language  are allowed to break backward-compatibility of code and therefore PHP 7 presented an opportunity for other improvements beyond phpng that require backward-compatibility breaks. In particular, it involved the following changes:-

  • Many mortal- or recoverable-level legacy PHP error mechanisms were replaced with modern object-oriented exceptions.
  • The syntax for variable dereferencing was reworked to be internally more consistent and complete, allowing the use of the operators ->[](){}, and :: with arbitrary meaningful left-hand-side expressions.
  • Support for legacy PHP 4-style constructor methods was deplore.
  • Constructors for the few classes built-in to PHP language which returned null upon failure were changed to throw an exception instead, for consistency
  • many unmaintained or deprecated server application programming interfaces (SAPIs) and extensions were removed from the PHP core, most notably the legacy MySQL extension.
  • An error allowing a switch statement to have multiple default clauses was fixed.

Data types

PHP language stores integers in a platform-dependent range, either a 64-bit or 32-bit signed integer equal to the C-language long type. Unsigned integers are converted to signed values in determined situations; this behavior is different from other programming languages. Integer variables can be assigned using decimal (positive and negative), octal, hexadecimal, and binary script.

Rate Now

Leave a Comment

Your email address will not be published. Required fields are marked *

Pin It on Pinterest

Scroll to Top