What is PHP?
- PHP stands for Hypertext Preprocessor.
- It is a server side programming language- it runs on a web server.
- The end result of running PHP script on server is always pure HTML.
- PHP is a loosely typed language, meaning there is no need to explicitly create, typecast, or destroy a variable, although you are not prevented from doing so.
- PHP is a powerful language for creating dynamic and interactive web pages.
- It is widely used, free and easy to deploy.
- When HTML scripts in file are saved as a file with .php extension, it becomes a PHP file. That is, an HTML file with PHP script embedded in it is a PHP file.
- PHP scripts must be run on web server, otherwise they won’t work.
What PHP can do?
Simply, a lot! PHP can
- Create pages dynamically
- Create, open, read, write, delete, and close files on the server
- Collect and manipulate form data
- Interface with databases
- Create and manipulate Adobe Flash and Portable Document Format (PDF) files.
- Be used to control authentication based user access.
- Tightly integrate with a wide array of credit-card processing solutions.
In brief, PHP doesn’t limit your scope to play on the web.
PHP offers almost 200 plus native libraries for disposal, collectively contains well over 1000 functions in addition to thousands of third party extensions.
PHP has a large number of Database supports, native support is offered for more than 25 database products including Microsoft SQL Server, MySQL, Oracle, PostgreSQL, Sybase, IBM DB2 and many a more.
PHP’s flexible string-parsing capabilities make it a candidate for being chosen by millions of developers worldwide.
PHP offers both procedural programming as well as the Object-oriented paradigm, though PHP was originally a solely functional language.
A few PHP rules to code in mind before starting PHP code
- PHP code is always enclosed by <?php and ?>.
- Every PHP statement must end with a semicolon (;).
- It’s a good idea to name a file on server with .php extension, if the file contains any PHP code.
- PHP variable names must begin with a dollar sign ($).