Extension:PhpTags

The PhpTags extension implements the concept of magic-expr>Special:MyLanguage/Extension:PhpTags/Magic expressions|Magic expressions with [http://www.php.net/manual/en/langref.php PHP language] syntax that allows you to create and use compatible but not monolithic MediaWiki extensions, which greatly increases the convenience, flexibility and phptags-perf>Extension:PhpTags/Performance|performance. magic-expr>Special:MyLanguage/Extension:PhpTags/Magic expressions|More ...

Description
The PhpTags extension has its own the runtime environment PHP code which supports scalar types, arrays, variables, operators, control structures. It also supports constants, functions and objects but it does not implement any of them except for some phpt-functions>Special:MyLanguage/Extension:PhpTags/Functions|language constructs.

When using a function, object or constant PhpTags calls corresponding extension. Therefore, a set of constants, functions, objects and actions that they produce only depend on additionally installed compatible extensions which can be found cat-ext-php>:Category:PhpTags extensions|here.

PhpTags designed so to be as similar to native PHP, therefore you should have the illusion of direct execution PHP code although this never happens.

Usage
The code should be placed between the tags  and. It can be located in any namespace if it is allowed by the variable.

It will display:

 Hello world!!!

[http://test.foxway.org/wiki/PhpTags/Hello Demo]
 * the function  is implemented in php-func>Special:MyLanguage/Extension:PhpTags_Functions|Extension:PhpTags_Functions.

More details can be found in the guide>Special:MyLanguage/Extension:PhpTags/Quick start guide|quick start guide.

Optional installation
@todo


 * editor>Special:MyLanguage/Extension:PhpTags CodeEditor|PhpTags CodeEditor
 * debugger>Special:MyLanguage/Extension:PhpTags Debugger|PhpTags Debugger

Additional installation
The PhpTags extension implements only magic-expr>Special:MyLanguage/Extension:PhpTags/Magic expressions|magic expressions and one is not contain any implementation of functions.

Install also cat-ext-php>:Category:PhpTags extensions|additional extensions which are compatible with magic expressions of the PhpTags.

The main ones are:


 * tags-wiki>Special:MyLanguage/Extension:PhpTags Wiki</>|PhpTags Wiki - allows query various data from MediaWiki core
 * tags-func>Special:MyLanguage/Extension:PhpTags Functions</>|PhpTags Functions - contains many functions for data processing
 * tags-widget>Special:MyLanguage/Extension:PhpTags Widgets</>|PhpTags Widgets - displays the data in different ways

Configuration parameters

 * $wgPhpTagsMaxLoops: Maximum number of allowed loops (by default it is 1000 loops)
 * $wgPhpTagsNamespaces: Array of namespaces in which the PhpTags extension is allowed to use. Boolean  allows usage in all namespaces (it is set by default)
 * $wgPhpTagsBytecodeExptime: Storage time of the compiled bytecode in cache, by default it is 2592000 seconds (30 days)