|
1 | 1 | # PHP Handlebars |
2 | 2 |
|
3 | | -A blazing fast, spec-compliant PHP implementation of [Handlebars](https://handlebarsjs.com/). |
| 3 | +A blazing fast, spec-compliant PHP implementation of [Handlebars](https://handlebarsjs.com). |
4 | 4 |
|
5 | | -Originally based on [LightnCandy](https://github.com/zordius/lightncandy), but rewritten to focus on |
6 | | -more robust Handlebars.js compatibility without the need for excessive feature flags. |
| 5 | +Originally based on [LightnCandy](https://github.com/zordius/lightncandy), but rewritten to enable |
| 6 | +full Handlebars.js compatibility without excessive feature flags or performance tradeoffs. |
| 7 | + |
| 8 | +PHP Handlebars parses and compiles large templates up to 40% faster than LightnCandy, |
| 9 | +and produces ~35% smaller runtime code. |
7 | 10 |
|
8 | 11 | ## Features |
9 | 12 |
|
10 | | -* Compile templates to pure PHP code. |
| 13 | +* Supports all Handlebars syntax and language features, including expressions, subexpressions, helpers, partials, and hooks. |
11 | 14 | * Templates are parsed using [PHP Handlebars Parser](https://github.com/devtheorem/php-handlebars-parser), |
12 | | -which implements the same lexical analysis and grammar specification as Handlebars.js. |
| 15 | +which implements the same lexical analysis and AST grammar specification as Handlebars.js. |
13 | 16 | * Tested against the [Handlebars.js spec](https://github.com/jbboehr/handlebars-spec). |
14 | 17 |
|
15 | 18 | ## Installation |
@@ -149,7 +152,9 @@ Helpers may return a `DevTheorem\Handlebars\SafeString` instance to prevent esca |
149 | 152 | When constructing the string that will be marked as safe, any external content should be properly escaped |
150 | 153 | using the `Handlebars::escapeExpression()` method to avoid potential security concerns. |
151 | 154 |
|
152 | | -## Missing features |
| 155 | +## Missing Features |
| 156 | + |
| 157 | +All syntax and language features from Handlebars.js 4.7.8 should work the same in PHP Handlebars, |
| 158 | +with the following exception: |
153 | 159 |
|
154 | | -All syntax from Handlebars.js 4.7.8 should work the same in this implementation, with the following exception: |
155 | | -* Decorators ([deprecated in Handlebars.js](https://github.com/handlebars-lang/handlebars.js/blob/master/docs/decorators-api.md)) have not been implemented. |
| 160 | +* Custom Decorators have not been implemented, as they are [deprecated in Handlebars.js](https://github.com/handlebars-lang/handlebars.js/blob/master/docs/decorators-api.md). |
0 commit comments