Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Php PHP Getting Started With PHP Tutorial

 
 

Share on Google+Share on Google+

PHP Getting Started With PHP Tutorial

Advertisement
Learn the basics of PHP with this quick and simple tutorial. Designed for the very beginners.

PHP Getting Started

     

Learn the basics of PHP with this quick and simple tutorial. Designed for the very beginners.

What is PHP?

It is an open source scripting language which can be used to develop the dynamic website easily. People are using PHP to develop small and big e-commerce applications.

History of PHP

  • In 1994 the development of PHP was started by Rasmus Lerdorf
  • On June 8, 1995,  it was released publicly
  • In 1997, Zeev Suraski and Andi Gutmans rewrote the parser.
  • In 1998, PHP 3 was officially launched
  • In 1999 Suraski and Gutmans  producing the Zend Engine
  • On May 22, 2004, PHP 4 was released and  it was powered by Zend engine 1.0

Different features in PHP

  1. Open source, free to download and use 
  2. Cross platform 
  3. Compatible with any server 
  4. Supports popular databases 
  5. Easy to learn 

Data types supported by PHP

Following data types are supported by PHP:

  • Integer: It is stored as signed integers with 32 bits, with a range of -2,147,483,648 and 2,147,483,647
  • Float: It is stored as IEEE floating point number with 64 bits.
  • String: It is a sequence of 8-bit characters.
  • Boolean: It has two literal values: 'true' and 'false'
  • Array: It store an ordered map of pairs of keys and values.
  • Object: It stores an instance of class.
  • Resource: It is for storing file handling, or database connection.
  • Null: It has only value null.
PHP Coding
Every code in PHP starts with <?php and ends with  ?>
If you want to print "I am learning php!" using PHP, then either use print or echo command, both are used to print anything on the screen, so type either :

Example 1:

<?php

  print("I am learning PHP");

?>

Example 2:

<?php

  echo("I am learning PHP");

?>

Output:


Above written codes will display on the screen :

I am learning PHP


 print and echo are almost similar besides that they have few differences like:

Speed: echo is slightly faster than print

Parameters: echo allows more than one parameter whereas print does not, e.g.:

<?php

  print "Hello","world";

?>

will generate error, whereas:

<?php

  echo "Hello","world",1,2,3;

?>

will gives the output as:

Helloworld123

Expression: print works like a function and returns true value after  successfully executed.

Note: For further queries on basis of PHP, please visit our website:

http://roseindia.net/tutorial/php/phpbasics/tutorial/index.html

or

http://roseindia.net/tutorial/php/phpbasics/index.html 

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 9, 2009

Related Tutorials

Discuss: PHP Getting Started With PHP Tutorial   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:12
saeed
August 31, 2011
sub

ok
wasim
August 31, 2011
great

its nice
Raj
May 21, 2012
PHP

how to check username and password using php in session
paramjit
June 13, 2012
computer engg.

php fil where are start?
raj
August 30, 2012
php

this is very useful to me....
Faruk Saliu
September 20, 2012
PHP

i am a new student in PHP and i wish to learn it to the fullest
sunil patil
September 20, 2012
object ref

thank you for regurding me
karan
January 7, 2014
php basics

it is very good experience, i am using wamp server for executing rose india coding. thanks...
parameswari
February 18, 2012
php

i like php but i don't no about php just i want to learn php earlialy
DMCA.com