Extension:PHPTemplates/zh

这个扩展能做什么？
此扩展允许您在页面中嵌入白名单的PHP代码. 为什么使用误称“PHP模板”？ 因为最终要审查类似于的代码，所以最好将PHP模板的范围限制为以 开头的模板. However, it is much easier at this time to plug into the MediaWiki parser via the general tag hook.

用法
That's all at this moment (yes, it will output "0"). The PHP grammar is rather complex, and trimming it down takes time.

下载说明
Please copy and paste the code found at GitHub and place it under.

安装
要安装此扩展，将下列代码加入即可：

限制用户的自由度
您可以增强PHP模板以稍微限制使用的资源. Duly note that enhancing in this context means amending the grammar and generating a new parser.

验证
While parsing the source, you can count the number of statements and their levels of nesting and require that certain limits are not exceeded.

运行时间
您不仅可以验证源，还可以即时对其进行修改和转换，例如：

到:

There will probably be some bombs that cannot be guarded against this way, but it should cover most common mistakes.

参见

 * - 允许您在维基页面中使用PHP语法