Unique Features of PHP

There are a lot of features in php and I am mentioning here some unique features of php that will give you a clear idea of php Hypertext Preprocessor
1. In PHP there is no need to specify data type for variable declaration. Rather, it can be determined at the time of execution depends on the value of the variable. So that, PHP is called as loosely typed language.
2. PHP provides cross platform compatibility, unlike some other server side scripting language.
3. PHP has set of pre defined variables called superglobals which will be start by _. Some of the examples are, $_GET, $_POST, $_COOKIE, $_SESSION, $_SERVER and etc. So, any variable except superglobals, that are start with _ will cause error.
4. PHP programming structure includes variable variables; that is, the name of the variable can be change dynamically.
5. This language contains access monitoring capability to create logs as the summary of recent accesses.
6. And then, it includes several magic methods that begins with __ character which will be defined and called at appropriate instance. For example, __clone() will be called, when the clone keyword is used.
7. Predefined error reporting constants are available to generate a warning or error notice. For example, when E_STRICT is enabled, a warning about deprecated methods will be generated.
8. PHP supports extended regular expression that leads extensive pattern matching with remarkable speed.
9. And then, properties like, nowdocs and heredocs are used to delimit some block of context which should not be sent for parsing.
10. Since PHP is a single inheritance language, the parent class methods can be derived by only one directly inherited sub class. But, the implementation of traits concept, reduce the gap over this limitation and allow to reuse required method in several classes.

PHP Learning tutorial class 1

Hope you know what is PHP and who developed it etc like things. We don’t need such thing to learn PHP but when we start with any thing we want to know at least some general basic things regarding the topic.
For beginning our PHP study we need to setup a Web server on our local computer. We want to install the following applications to our system

  • APACHE SERVER (web Server)
  • PHP ( Server Side Scripting Language)
  • MYSQL (Database )
  • PhpMyAdmin ( Database Managment Application)

It is little difficult to install these software separately, so we can install them with the help of server package programs available in various sites with free of cost.
Please go to one of the below links to get the WAMP program – ( Windows Apache MySql PHP) or XAMPP – X indicates Cross platform all other letters are same as before and last additional P indicates Perl it is also a programming language.
Please Download Wamp or Xammp using the below links according to the configuration of PC
WAMP
XAMPP
Hope you are downloaded the program and installed it by double clicking it. if you need any help for installing the above please free to contact me.
If you chose WAMP we will get a folder named wamp in the hard disk drive you installed our server program. Otherwise xampp is your folder name. Open it by double clicking it we will get a folder named www in wamp and htdocs in xampp. Friends This is our root folder, We are putting our files here to execute.
Write you First php code ( Save it in the folder php/index.php )

<?php
 echo "hello world!";

Call the code from url

http://localhost/php/index.php