Error message

  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; views_display has a deprecated constructor in require_once() (line 3190 of /home/krishhni/public_html/eduoncloud.com/includes/bootstrap.inc).
  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; views_many_to_one_helper has a deprecated constructor in require_once() (line 113 of /home/krishhni/public_html/eduoncloud.com/sites/all/modules/ctools/ctools.module).

Learn PHP Tutorial

Basic PHP

PHP is scripting language used for development of dynamic web applications. Best combination to use PHP is Linux, Apache, MySQL and PHP (LAMP stack). Its very easy to learn PHP and develop dynamic web applications for your website and Intranet.

PHP Introduction

  • This article introduces you with the PHP programming language. The PHP is server-side, platform independent, scripting language to develop dynamic web applications
  •   The PHP scripting language is cross-platform and can run on Windows, Linux, Mac, Solaris, Unix and other platforms where PHP interpreter is available.
  •  It is an open source server-side scripting language, mostly used for the development of web based dynamic web applications. 

How can work in PHP

  • The word PHP stands for Hypertext Preprocessor. It is open-source scripting language that can be embedded into HTML page.
  •  PHP allows the developers to add the dynamic processing logic to HTML file. So, you can make your html dynamic by using the PHP code in it.
  •   Generally PHP file is saved with the .php extension. Since, PHP is interpreted language it is not compiled into binary file like Java.
  •   You can modify your code and copy on the server and the PHP processor executes it once it is accessed from the web browser.

PHP is a open source, interpreted and object-oriented scripting language i.e. executed at server side. It is used to develop web applications (an application i.e. executed at server side and generates dynamic page)

  • PHP is a server side scripting language.
  • PHP is an interpreted language, i.e. there is no need for compilation.
  • PHP is an object-oriented language.
  • PHP is an open-source scripting language.
  • PHP is simple and easy to learn language.

There are given many features of PHP.

  • Performance: Script written in PHP executes much faster then those scripts written in other languages such as JSP & ASP.
  • Open Source Software: PHP source code is free available on the web, you can developed all the version of PHP according to your requirement without paying any cost.
  • Platform Independent: PHP are available for WINDOWS, MAC, LINUX & UNIX operating system. A PHP application developed in one OS can be easily executed in other OS also.
  • Compatibility: PHP is compatible with almost all local servers used today like Apache, IIS etc.
  • Embedded: PHP code can be easily embedded within HTML tags and script.

To install PHP, we will suggest you to install AMP (Apache, MySQL, PHP) software stack. It is available for all operating systems. There are many AMP options available in the market that are given below:

  • WAMP for Windows
  • LAMP for Linux
  • MAMP for Mac
  • SAMP for Solaris
  • FAMP for FreeBSD
  • XAMPP (Cross, Apache, MySQL, PHP, Perl) for Cross Platform: It includes some other components too such as FileZilla, OpenSSL, Webalizer, OpenSSL, Mercury Mail etc.

If you are on Windows and don't want Perl and other features of XAMPP, you should go for WAMP. In a similar way, you may use LAMP for Linux and MAMP for Macintosh.

  • PHP performs system functions, i.e. from files on a system it can create, open, read, write, and close them.
  • PHP can handle forms, i.e. gather data from files, save data to a file, thru email you can send data, return data to the user.
  • You add, delete, modify elements within your database thru PHP.
  • Access cookies variables and set cookies.
  • Using PHP, you can restrict users to access some pages of your website.
  • It can encrypt data.
Characteristics of PHP
Five important characteristics make PHP's practical nature possible −
  • Simplicity
  • Efficiency
  • Security
  • Flexibility
  • Familiarity

We have set up the PHP Programming environment on-line, so that you can compile and execute all the available examples on line. It gives you confidence in what you are reading and enables you to verify the programs with different options. Feel free to modify any example and execute it on-line.

 

<html>

   <head>
      <title>Online PHP Script Execution</title>
   </head>
   
   <body>
   
      <?php
         echo "<h1>Hello, PHP!</h1>";
      ?>
   
   </body>
</html>