Manual:Parse.php

Details
parse.php file is a maint-script>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 overriden 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