PHP is powerful tool for making dynamic website.
PHP is the widely used, free and also easy to learn.
PHP script startup with tag
//your script code here!
now here, one question raised in your mind ..
What does a special set of tags <?= and ?> do in PHP?
answer is the output of your code will directly displayed on browser.
Oky now lets talk about Different Version of PHP.
- come up with new name Hypertext Preprocessor.
- zeev and andi designed new extension API.
- New API support additional extension for performing task such as accessing database, spell checker, and other technologies.
- PHP3 still continuously parsed the scripts while executing them, PHP4 comeup with new paradigm of “Compile First, Execute Later”.
- Compilation step does not compile php script into machine code, it instead compiles them into bytecode, which is executed by zend framework.
- Zend stands for zeev and andi.
- PHP4 was run on most popular web server.
- PHP4.1.0 introduced super global variable such as $_GET and S_POST.
- super global can be accessed from within function without global keyword.
- This feature was added in order to allow the register_globals INI option to be turned off.
- register_globals is a feature in php which automatically convert input variable in php variable.
- like http://localhost/first.php?foo=bar to php variable called $foo.
- php4.2.0 was released with register_globals turned off by default.
- php4.3.0 introduced the command line interface, a revamped file and network layer called IO Stream.
- Come up with opps concept.
- it contain many new features which make it the ultimate web development plateform.
- the rewritten XML functionality in PHP5 puts it on par with other web technologies in some area and over takes them in others, especially due to the new SimpleXML extension which makes it so easy to maintain XML doc.
- Inheritance : gives ability for a class to fulfill more than one is-a relationship. a class can inherit only from one class, but may implements as many interface as it wants.
- instanceof operator :
if($obj instanceof circle)
print '$obj is object of circle class';
- Final keyword: it allows you to mark method so that inheriting class can’t overload them.
- Explicit Object-Cloning: To clone object you must have to use the clone keyword, you may declare _clone() method, which will be called during the cloning process.
- _(sing) in front of method name represent method as magic method.
- there are so many new features of php5 .but i listed some of imp here.