Extension:Foxway

The Foxway extension adds in the wikitext parser the ability to use the syntax and functions of PHP.

It has its own implementation of the interpreter and runtime for PHP code, and never use direct run custom code in PHP interpreter installed on your computer
 * This extension does not allows run php code! It works the same way as other extensions like Extension:ParserFunctions, but instead of using wiki syntax, uses the syntax of PHP.
 * This extension does not allow creation of raw HTML pages, because MediaWiki parser processes the foxway outputs like any other text

You can see examples and try it in sandbox namespace.

...

Usage
The tag is used to embed blocks of PHP code into wikitext, which are then executed. The standard PHP functions  may be used to pass output back to the parser.

All variables declarations persist from one block/expression to the next, throughout the page. Complicated expressions and calculations can thus easily be separated from their presentation

See also other examples

Configuration parameters

 * $wgFoxwayFunctions: Contains an array of implemented functions, which is available to users. You can disable any of the functions are at your discretion.