Manual:Parse.php

Details
parse.php file is a 2>Special:MyLanguage/Manual:Maintenance scripts|maintenance script that parses some wikitext.

Wikitext can be given by stdin or using a file. The wikitext will be parsed using  as a title. This can be overridden with  option.

Examples
$ php parse.php --title foo foo^D  foo 

$ echo "bold" > /tmp/foo.txt $ php parse.php /tmp/foo.txt bold

$ cat /tmp/foo | php parse.php bold