josbeir/sugar

A fun and safe PHP templating engine

Maintainers

Details

github.com/josbeir/sugar

Source

Issues

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 1

pkg:composer/josbeir/sugar

0.3.1 2026-02-12 10:15 UTC

README

Sugar cube Build Status PHPStan Level 10 License: MIT PHP Version codecov Packagist Downloads

A modern PHP (8.2+) templating engine that compiles to pure PHP. Sugar keeps native PHP and HTML intact while adding s: attributes for control flow, context-aware escaping, pipe syntax (|>) for helpers (a PHP 8.5 feature supported on 8.2+), and composable helpers. Write templates the way you already do, then let the compiler turn them into fast PHP that runs with zero runtime overhead.

Warning

Sugar is under active development. Core features are stable, but the API may change before 1.0.

Documentation and more information

Read the Documentation

License

Sugar is licensed under the MIT License. See LICENSE.

Contributing

Contributions are welcome. Please read Contributing for setup steps and guidelines.