star

star

star is a Simple Templates And Renderer script for PHP  to produce web pages from HTML templates.  Unlike virtually every other contemporary PHP template engine, star has zero dependencies, and does not require Composer and ten million other files and folders of unknown provenance.  It is a single file, consisting of 600 lines of code, and you can paste it right into your existing script.  It's not going to win any awards or accolades, because it bucks all the trendy things, but just efficiently does the job it was designed for.

Concept:

star was created so I can occasionally create PHP Web applications that make use of HTML templates. star has no dependencies other than PHP itself, and uses no frameworks.  It is intended to be used via a require_once or pasted into a script.  star caches the result of template processing as PHP to maximize performance.  It supports Twig-style inheritance, variables, includes, and conditionals. It escapes output to protect against XSS attacks.

Documentation:

Support

You can ask for help with star on the mailing list.

Version history:

Requirements, Download(s):

Mailing List

Mailing list | Archives

Home