PHP
From Botdom Wiki
| PHP | |
|---|---|
| | |
| Paradigm | imperative, object-oriented |
| Appeared in | 1995 |
| Designed by | Rasmus Lerdorf |
| Developer | The PHP Group |
| Latest release | 5.2.6 |
| Unstable Release | 5.3.0-dev and 6.0-dev[1] |
| Typing discipline | Dynamic, weak |
| Influenced by | C, Perl, Java, C++, C#, Python |
| OS | Cross-platform |
| License | PHP License |
| Website | http://php.net/ |
PHP (PHP: Hypertext Preprocessor) is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. It's the language in which most of bots for dAmn are written, including the very first one.
Basic syntax
Variables in PHP are prefixed with the character $. Variables are type-independant for most types unless defined otherwise. This means that the string "1" is the same as the integer 1 or the float 1.
$var = "1";
All lines in PHP must be suffixed with a semicolon. You can also set more than one variable to the same value at once:
$var = $var2 = $var3 = "1";
You can calculate numbers inline in PHP:
$var = (1 + 2)*3 / 4;
You put strings together using the period character:
$var = "lala" . "lala";
The value of this var would be "lalalala". You can do this even with numbers:
$var = "1" . "2";
The value of this var would be "12".

