PHP is a programming language that is used for web development and other general-purpose applications. Originally, PHP was just a shorthand name for ‘personal homepage’ but today it is known as PHP: Hypertext Preprocessor. PHP is script-based, interpretive, and server-side, and is available in free and open source libraries. Implementations exist for Windows, Unix, and other operating systems.
Created in 1994, PHP developed organically, not designed as many programming languages are. In fact, it was not intended as a language at all but rather was created naturally as the developer, Rasmus Lerdorf, wrote code to maintain his personal homepage. This organic development has led to some inconsistencies in terms of naming functions and ordering parameters. Early on, other developers stepped in and today PHP has a standard language specification provided by the PHP Group.
The most common and popular implementation of PHP is referred to as the Zend Engine, which was created by two of the early developers who later went on to found Zend Technologies Ltd. The Zend Engine is considered the standard or “reference” implementation of PHP. PHP runs on popular server platforms, such as the Apache Foundation’s Apache, and Microsoft’s IIS.
Because PHP is an HTML scripting language, it can be embedded in the HTML definition of a web page. PHP code “wraps” HTML statements, providing real-time modification and customization of the HTML statements, and therefore dynamically changing the appearance of a web page.
Despite its having its own set of programming methods and features – just like all languages – because of its similarity to Java and other modern programming languages, it is considered relatively easy to learn.
PHP code runs on the server so the user (web client) sees only the final HTML, including any on-the-fly customization provided by PHP. The PHP code itself is not visible to the user. This invisibility of the PHP code provides a measure of security for the web application.
An example of PHP code shows how it interacts with the web page’s HTML definition:
Note that the final HTML simply displays the message “Today is Friday” or “Today is not Friday”. None of the PHP code is visible to the web client.
When PHP is run as interpreted code, the code is parsed and “interpreted” each time the web page is referenced by a user. This is the method used by Zend PHP. Although a PHP interpreter is acceptable for most uses, greater efficiency can be obtained by using a PHP compiler, which renders the PHP code into actual machine code. An example of a PHP compiler is Facebook’s HHVM, which translates PHP code into machine code using a just-in-time compiler.
ith its popularity, flexibility and wide distribution, PHP is a powerful addition to the web programmer’s toolkit, providing a useful ability to dynamically customize the appearance and functionality of a web page.
If you want to program your trading strategy using PHP, click apply now.