PHP was invented by Rasmus Lerdorf in 1994 for his own use (posting his resume in this case). Formerly abbreviation for Personal Home Page now become Hypertext Preprocessor, PHP is becoming a standard in the world of web programming with its performance, reliability, flexibility and speed.
We’ll be covering the following topics in this tutorial:
Birth of this language
PHP was born in 1994 of a Perl program written by Rasmus Lerdorf to analyze visits his online resume. It rewrites the C language application and then opens its program to the free software community. Thus, he can now count on the help of many developers. His PHP application merges with an engine forms processing, FI, giving version 2. With version 3, the functions become numerous and popularity grows.
Language Evolution
The PHP language has evolved yet. We are currently in PHP 6. Users are not forced to take the train every technical advance for several reasons:
• Many production sites are made in PHP 3 or PHP 4 and work very well;
• Web hosts often offer PHP 4 configuration; the object language requires a more elaborate reasoning. Several reasons can grow to change the version:
• A platform or framework passes this version and we are interested; by challenge and desire to learn new syntax or frameworks.
Interest in this language
PHP is free, portable and easy to understand. It is a language for everyone. This is not an esoteric language intended only for professionals, with an incomprehensible jargon. Some called complex languages are fashionable because of their complexity allows businesses to spend much time on expensive applications paid. PHP is flexible, robust and fast for interested professionals and wealth of tools will make in the coming years, the preferred language of all companies.
Freedom
PHP is free. Thus, most free hosts offer it with the MySQL database, free too. Free also means that anyone can enrich provided to benefit everyone graciously. Within the free software community, licenses disclaim separate copyright. Indeed, free does not mean that anything goes or that everything is free.
The PHP language is constantly evolving thanks to a community of approximately 200 developers. The documentation is continuously updated and thousands of sites around the world devote themselves by publishing articles, forums, tips or offering free applications. PHP is carried by a wave of popularity that continues to grow.
Portability
PHP can run on any machine. The programs you create are executable on Unix, Linux, Windows or Macintosh. This feature frees you of decisions made by Microsoft or Apple and secures the future of your application.
The facility
PHP can be addressed by all. First, it’s free and continuously enriched by many developers (about 200). On the other hand, it is simple to start programming in PHP. All this plays a great role in its popularity. The fact that it is supported by a large number of developers ensures a continuous evolution and promotes the integration of the latest developments in computer language.
The language is simple. You start immediately and get a result. This allows everyone to learn at their own pace and integrate the knowledge of the functions and extensions to suit his desires.
A little history
The PHP language is derived mainly from the Perl language; it is therefore based on the string type, or string. The string in English is the thread of a pearl necklace. In the C language, which is the ancestor of most languages currently in use, there is no string type. Only the characters exist as A or B. A sentence is then an array of characters with the first character in the first box and the number 0 in the last box, to complete the chain. A string is a string of characters, which is quite far from the way we see the words that are real units of language. Perl was designed to simplify the rules that governed the writing of programming languages. The idea was to bring writing code natural language that is to say how the human is expressed. The Perl language gave birth to the PHP language while other languages have taken other routes.
PHP, Perl from its base and C, borrowed object-oriented design in Java (in version 3). The main purpose of an object language is the reuse of autonomous and portable programming blocks in several programs. This language is derived from C ++ code. The approach Java developers follows the same conclusion: the C ++ language is heavy to handle, it was necessary to simplify and secure the use. Designers create the Java language under the aegis of Sun Microsystems. The Java code does not have the flexibility of PHP language, so a piece of PHP language program that takes fifteen minutes to design and write request over an hour in Java. Java programmers say that the PHP language is a language of “hack”. One can actually do everything and anything. What PHP programmers take as a compliment? Both languages tend to approach, at least, PHP can now, through libraries, use Java classes. PHP is mixed of all these cultures.
We will not have the place to address the aspect of the object programming language PHP. By cons, in the articulation of PHP files (application architecture), we will draw the object programming. Then you can tune to learn the syntax PHP and practice to master this aspect of language. Version 5 of PHP will develop this aspect. The feature of the PHP language is to keep backward compatibility. Thus, some functions have changed names but the old name is still operational. All this is a polymorphic language PHP language. We will compare it to an encyclopedia. For each problem posed, there are several approaches. You can use whatever works from the time where you keep consistency and rigor. Remember indeed to be rigorous because PHP does not require you to follow the beaten track.
Operation
PHP core is a C language motor located on the server. When a file is called a web browser, according to its extension (.htm, .php, .asp …), the server sends it directly to the browser to display the page or treats (in the case of a .php file) by running the commands of the PHP language, the result is returned as HTML code.
PHP is interpreted in its version 3 and compiled on the fly in version 4. The compiled language is a little faster for the machine.