This is post post in new series started by PHP Tutorials for Beginners by Gautam. This post provides general introduction to PHP and some historical facts about it! As PHP if language top-blogging platform WordPress uses, it is good to have little understanding of PHP. This will help you for sure in your blogging carrier even if programming is not your prime occupation. (Added by Editor)
Welcome to PHP Tutorials for Beginners. I am Gautam. I will be writing PHP Tutorials for DevilsWorkshop readers over the next few days.
PHP allows you to create very simple web pages with dynamic content to full-featured web applications that connect to back-end databases. If you use HTML to develop websites, PHP will be a next good step for you. Basic knowledge of HTML and CSS is recommended but is not necessary.
I will be starting from the very basics of PHP and then cover some important techniques that you can use in PHP. I will be also covering the basics of working with MySQL database. I recommended you to try the tutorials on your own on any free host or XAMPP (I will talk about it after a while).
Of course, I can’t cover everything but I will help you to start with it and cover the important things. You may ask any query you have in the comments section. So let’s start and best wishes to you from my side. 😉
PHP… What is it?
Well, the most common definition of PHP is that it is a HTML-embedded scripting language which runs on the server side. Also, PHP doesn’t need to be compiled like other programming languages like C or Java. Its syntax is much like C, Java and Perl. One can write dynamic pages using PHP.
PHP stands for PHP: Hypertext Preprocessor. This confuses many people because the first word of the acronym is the acronym. This type of acronym is called a recursive acronym. For more information, the curious can visit Dictionary of Computing or the Wiki entry on recursive acronyms. You can find more information on PHP here.
History
History of anything is usually boring but, of PHP, its very interesting!
First Version of PHP was created under the name PHP/FI (Personal Home Page/Form Interpreter) as open source by Rasmus Lerdorf in 1995.
By 1997, PHP/FI 2.0 was released; with approximately 50,000 domains reporting as having it installed (about 1% of the domains on the Internet).
Here is an example of PHP/FI Code:
(Note: Following codes no longer works today. Also PHP syntax is different today!)
<!--include /text/header.html-->
<!--getenv HTTP_USER_AGENT-->
<!--ifsubstr $exec_result Mozilla-->
Hey, you are using Netscape!
<!--endif-->
<!--sql database select * from table where user='$username'-->
<!--ifless $numentries 1-->
Sorry, that record does not exist
<!--endif exit-->
Welcome <!--$user-->!
You have <!--$index:0--> credits left in your account.
<!--include /text/footer.html-->
PHP 3.0 was the first version that closely resembles PHP as we know it today. It was created by Andi Gutmans and Zeev Suraski in 1997 as a complete rewrite, after they found PHP/FI 2.0 severely underpowered for developing an eCommerce application they were working on for a university project.
The whole new language was released under a new name. It was named plain ‘PHP’, with the meaning being a recursive acronym – PHP: Hypertext Preprocessor. By the end of 1998, PHP grew to an install base of tens of thousands of users (estimated) and hundreds of thousands of websites reporting it installed. At its peak, PHP 3.0 was installed on approximately 10% of the Web servers on the Internet. By the winter of 1998, shortly after PHP 3.0 was officially released, Andi Gutmans and Zeev Suraski had begun working on a rewrite of PHP’s core.
The new engine, dubbed ‘Zend Engine’ (comprised of their first names, Zeev and Andi), was first introduced in mid 1999. PHP 4.0 was based on this engine and was officially released in May 2000.
PHP 5 was released in July 2004 after long development and several pre-releases. It is mainly driven by its core, the Zend Engine 2.0 with a new object model and dozens of other new features.
Here is an example of PHP 5.0 Code:
<?php
echo "Hello World!";
?>
You may read the full history of PHP here.
My next post will contain what programs you need (recommended ones) with their configuration to use PHP.
12 Comments
And what’s phpBB??
@ Rishabh
phpBB is a popular Internet forum package written in the PHP scripting language. The name “phpBB” is an abbreviation of PHP Bulletin Board. It is a free software.
I have been using WAMP and its sufficient.
@Pushpinder
I am writing PHP tutorials and many are yet to come. This is just the beginning. 🙂
Hey! Great post….I have always wanted to learn php but couldn’t due to some or the other reason. Now maybe through your posts I might, so keep posting asap.
NOTE: I will publish next post tomorrow. We will start of with learning PHP.
Also, I have to do something about that code plugin. Its not displaying code properly. Till then, click the code button in the top-right corner to view the code.
Cool going Mr. PHP 😉
this will really be helpful to me as i know nothing about it.
hey can you tell me where exactly php can be used where it proves better than javascript and other java technologies.
Also why go for php when there are java technologies…
I just asked it here out of curiosity because i am about to learn php and advanced java. So wanted to have a clear idea.
@bond
Every language has its own plus and minus points. You can’t/shouldn’t compare any language with another. And let me tell you that Java is a programming language and php is a scripting language. Javascript is client-side scripting language and php is server-side scripting language.
I am interested to learn of PHP.But ,in this moment i have some idea only on c programming.So,what can i do at now.Specially,which material are need to learn PHP.Please send in my email address with some tips to learn it……..
Please accept my Fb request
And please suggest a book to learn Php A good one like for those who have no idea what it is