An Introduction to The Php (Hypertext Preprocessor)

Google+ Pinterest LinkedIn Tumblr +

PHP (Hypertext Preprocessor) is an open scripting language mainly used for producing dynamic web pages via an HTTP. The PHP language was created in 1994 by Rasmus Lerdorf, it was originally a software library in Perl which he used to keep track of website visitors.

Gradually, as he added new features, Rasmus transformed the library into an implementation in C language, capable of communicating with databases and create dynamic applications for the internet.

Although everything in its design is intended to facilitate the creation of web pages, it can create applications with a graphical user interface using the PHP extension PHP-GTK or Qt. The language can also be used from the command line, in the same way as Perl or Python, this version of PHP is called PHP-CLI (Command Line Interface).

When the client requests the server to send a web page, the server runs the PHP interpreter. This script processes will generate dynamic content (eg through getting information from a database). The result is sent to the server by the interpreter, which in turn sends it to the client.

By extension it is also possible to generate PDF files, Flash and images in different formats. PHP allows connection to different types of database servers such as MySQL, Postgres, Oracle, ODBC, DB2, Microsoft SQL Server, Firebird and SQLite.

Presentation

PHP  was designed to allow the creation of dynamic applications, mostly devoted to the internet. It can also generate other formats in connection with the internet, such as WML, SVG, PDF, or bitmap images such as JPEG, GIF or PNG.

The language is overwhelmingly installed on an Apache server, but can be installed on the other main HTTP servers, such as IIS. This coupling is used to retrieve information from a database, a file system or simply data sent by the browser to be read or stored for use later.

PHP for beginners

It is a simple language and thus easy to learn for a beginner, but security vulnerabilities can quickly appear in its applications. PHP is not encumbered by theory and tends to choose the most direct route. Although, function names as well as argument passing do not always observe a unified logic, which is sometimes detrimental to learning.

Its use begins with the processing of forms and through access to databases. Access to databases is easy once the corresponding installation of modules on the server is completed.

It is a multi-platform: PHP can easily extend the same code in an environment somewhat similar (taking into account the rules of directory trees that can change).

PHP Version 5 and 6

Version 5.3 has introduced many features such as: Namespaces – a fundamental element of the development of extensions, libraries and frameworks structured – anonymous functions, closures, etc..

Version 6 introduces the internal ICU library giving the language the ability to handle unicode natively.

Operation

PHP is part of the large family of descendants of C, whose syntax is very close. In particular, its syntax and its construction are similar to those of Java and Perl, with the difference that PHP code can easily be mixed with HTML code in a PHP file.

In web usage, execution of PHP code runs well: when a visitor requests a web page, the browser sends a request corresponding to the HTTP server. If the page has been identified as a PHP script (usually with the extension. Php), the server calls the PHP interpreter which will process and generate the final code of the page (generally consisting of HTML or XHTML, but also often CSS and JS). This content is returned to the HTTP server, which sends it to the client.
 

Share.

About Author

Leave A Reply