PHP

PHP is programming language designed to make website and to write robots.

In the case of macintosh, PHP comes together with the XCode package. As other programs, it can be localized with command which php. Command man php characterises PHP it as follows:  is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.  The same definition is suggested at the http://php.net/ site .

PHP coode
The PHP code begins with word \(\rm \)

Between these two words, the PHP commands are placed. These commands are executed in a way similar to that in other languages, while the php program or the web browser finds the code.

Wikipedia suggests the following example of code embedded to HTML

<!DOCTYPE html>  PHP Test 

The specification of charset is not essential, but helps to deal with case, if any non–ascii characters appear in the text echoed: for some languages, even in century 21, several systems of encoding are used; a text, prepared at one computer, looks as abracadabra, while viewed at another computer. In century 20, In some countries, the mafia at the top of government blocked elaboration of the united encoding for national language in computers; this was important part of prohibition of non-authorized distribution of information. The great efforts of programmers and users were required to mitigate this problem. The specification charset=utf-8 serves as reminder, that one should always use Unicode for important documents.

Executing from the command line
PHP code stored in file \(a\).php can be executed from the command line with command

php \(a\).php

where \(a\) denotes name of file.

Variables
Names of variables begin with the dollaR sign. In TORI, the dollar sign switches the math style for typing formulas. To load a PHP program to TORI, the options

\(\rm \)

and

\(\rm <\! poem \! >\)

can be used.

Example: welcome.php

Welcome ! You are  years old.

03.html <!DOCTYPE html>

 Name:  Age: 

As in Mathematica, In PHP, types of variables have no need to be especially declared. The type of variable is assigned according to the type of expression in th eright hand side of the assignment operator.

Sintax
The syntax of PHP is similar to that of C++; many C++ expressions can be used in PHP as is.

However, in order to provide new line, instead of just "\n", in PHP one should type "\r\n".

Keywords
Programming language, C++