happycode/stencil

A super lightweight PHP String Templating library

1.0 2022-06-09 23:50 UTC

This package is auto-updated.

Last update: 2024-09-10 04:56:03 UTC


README

A PHP Micro-Library, for stupidly simple string Templates.

Usage

composer require happycode/stencil

then, wherever..

  echo (new Stencil())->parse(
              "Whats up {{ name }}, it's {{ date:d-m-Y H:i }}", 
              ['name' => 'Doc']
  );

will give you what you might imagine.

nice!

Copyright and License

The happycode/stencil library is copyright © [Paul Rooney](Happy Coder) and licensed for use under the terms of the MIT License (MIT). Please see LICENSE for more information.