From Botdom Wiki
Jump to navigation Jump to search
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<ref>Template:Cite web</ref>
Typing discipline Dynamic, weak
Influenced by C, Perl, Java, C++, C#, Python
OS Cross-platform
License PHP License

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 <php-inline>$</php-inline>. Variables are type-independant for most types unless defined otherwise. This means that the string <php-inline>"1"</php-inline> is the same as the integer <php-inline>1</php-inline> or the float <php-inline>1</php-inline>. <php>$var = "1";</php> All lines in PHP must be suffixed with a semicolon. You can also set more than one variable to the same value at once: <php>$var = $var2 = $var3 = "1";</php> You can calculate numbers inline in PHP: <php>$var = (1 + 2)*3 / 4;</php> You put strings together using the period character: <php>$var = "lala" . "lala";</php> The value of this var would be "lalalala". You can do this even with numbers: <php>$var = "1" . "2";</php> The value of this var would be "12".

Bots created using PHP