Extension:PhpTags/Quick start guide

Usage
There are two ways to use this extension on the wiki pages, and each of them has its own features.

The main way is to place the PHP code between the tags  and. In this case PhpTags returns "Strip marker" and the result is sent for processing to the MediaWiki Parser.

Another way is to use PhpTags as the parser function:

In this case PhpTags returns string that can be processed by other parser functions.

Illustrative examples are given here.

Short syntax
For ease of use it is possible to use the short syntax.

Examples here

PhpTags Code
PHP is easy to learn and popular programming language and PhpTags designed so to be as similar to native PHP. Thus any PHP code should work correctly in PhpTags.

Variable scope
The scope of a variable is the context within which it is defined. For the most part all PhpTags variables only have a single scope. Any variable used inside a page is by default limited to the local page scope.

Another important feature of variable scoping is the static variable. A static variable exists only in a local page scope, but it does not lose its value when PhpTags execution leaves this scope.

Demonstration of static variables.

Template parameters
The parameters that will be passed in when the template is used available through the the special PhpTags-defined  array.