PHP - Internet Technologies

What is Internet Programming Languages - PHP?

PHP is short form of Hypertext Preprocessor (PHP). It is a programming language which helps web developers in creating dynamic content which interacts with databases. Primarily, PHP is used for developing web based software applications.

Rasmus Lerdorf developed the first version of PHP in 1994.

Key Points

  • PHP is termed as recursive acronym for "PHP: Hypertext Preprocessor".
  • PHP is the server side scripting language used to manage dynamic content, session tracking, databases etc by embedded it in HTML.
  • Many popular databases like MySQL, Oracle, Sybase, PostgreSQL, Informix, and Microsoft SQL Server are integrated with PHP.
  • PHP when compiled as an Apache module on the Unix side is considered zippy in its execution. The MySQL server executes even very complex queries with huge result sets in record-setting time.
  • Several protocols are supported by PHP such as POP3, LDAP and IMAP. PHP4 added support for Java and distributed object architectures (COM and CORBA), making n-tier development a possibility for the first time.

Uses of PHP

Below are the reasons why PHP has become a popular scripting language for web developers −

  • PHP even performs the system functions, i.e. it can create, open, read, write, and close files on the system.
  • It can handle forms as well i.e. gather data from files, save the data to a file, through email you can send data, return data to the user.
  • PHP can allow adding, deleting, and modifying elements within your database.
  • Cookies can be accessed and set using PHP.
  • Using PHP, users are restricted to access some pages of your website.
  • PHP can encrypt the data.

Characteristics

Five important characteristics make PHP's practical nature possible −

  • Simplicity
  • Efficiency
  • Security
  • Flexibility
  • Familiarity

"Hello World" Script in PHP

Lets get started with simple PHP scripts. Since "Hello, World!" is a common example, first we will create a friendly little "Hello, World!" script.

As PHP is embedded in HTML, we can see the PHP statements in between normal HTML like this −

It will throw below result −

From above, you can observe that the PHP code is not present in the file sent from the server to the Web Browser. All the PHP code in web page is processed and stripped from the page. Client receives the pure HTML output.

Below are the ways to include the PHP code that is recognized by PHP Parser.

« Previous Topics
Javascript
Css
Html

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Internet Technologies Topics