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.
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 :
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
- Open source, free to download and use
- Cross platform
- Compatible with any server
- Supports popular databases
- 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.
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:
I am learning PHP
No comments:
Post a Comment