Press "Enter" to skip to content

Best PHP tutorial Online

admin 0

Best PHP tutorial - What Is PHP?

  • PHP – PHP stands for “PHP: Hypertext Preprocessor”. In 1994 Rasmus Lerdorf unleashed the first version of PHP .
  • PHP is a server side scripting language .
    PHP is an open source project /general-purpose scripting language that is especially suited to web development and evolved as more and more people found out how useful it was.
  • PHP is a very easy language that can be embedded into HTML.
  • PHP script can be run on all major operating systems, including Linux, many Unix variants (including HP-UX, Solaris and OpenBSD), Microsoft Windows, macOS, RISC OS, and probably others.
  • PHP support for most of the web servers today. This includes Apache, IIS, and many others.
  • After Choosing Operating system and web server now you have the choice of using procedural programming or object oriented programming (OOP), or a mixture of them both.
  • PHP support for a wide range of databases like MySQL, PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server, connect to any database supporting the Open Database Connection standard via the ODBC extension. Other databases may utilize cURL or sockets, like CouchDB.
  • PHP is used to manage dynamic content, databases, cookies, session tracking, and even build entire e-commerce sites.
  • PHP Syntax is C language Like.
  • PHP has support protocols such as LDAP, IMAP, SNMP, NNTP, POP3, HTTP, COM (on Windows) and many more ,so that it can talk to others services easily .

Uses of PHP

  • It is used for creating dynamic websites.
  • PHP support interacting with any back-end and database server e.g. MySQL, HTML etc
  • PHP use for implement the business logical layers (one or more)
    It can Encrypt Data
  • PHP support Cookies variable and set cookies
  • PHP code is used for send and receive E-Mails.
  • PHP has a number of inbuilt functions which find today’s date, and then build a calendar for the month. Etc
  • PHP script has system functions, i.e. from files on a system it can create, open, read, write, and close them.
  • It can handle forms, i.e. gather data from files, save data to a file.

Characteristics of PHP

  • Simplicity
  • Efficiency
  • Security
  • Flexibility
  • Familiarity

PHP Script Example "Hello World"

To get a feel of PHP, first start with simple PHP scripts. Since “Hello, World!” is an simple example,

As mentioned earlier, PHP is embedded in HTML examples . That means that in amongst your normal HTML you’ll have PHP statements can be embedded like this:

<?php echo “Hello World”; ?>


Output of above code is as follow:

Hello World

In this example we have seen that PHP has embedded inside the the HTML code the PHP code sends to to server and translated or executed by server and the output is displayed on the with HTML on browser screen.Lets Understand the above code

PHP script Start with <?php
PHP script End with ?>
Echo will display the Hello World on Browser.

PHP code Example without embedded in HTML

<?php  echo “Hello World” ; ?>