[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-8544":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":27,"discoverSource":28},8544,"mustache.php","bobthecow\u002Fmustache.php","bobthecow","A Mustache implementation in PHP.","http:\u002F\u002Fmustache.github.io\u002F",null,"PHP",3283,436,108,2,0,4,29.92,"MIT License",false,"main",true,[],"2026-06-12 02:01:55","# Mustache.php\n\nA [Mustache][mustache] implementation in PHP.\n\n[![Package version](http:\u002F\u002Fimg.shields.io\u002Fpackagist\u002Fv\u002Fmustache\u002Fmustache.svg?style=flat-square)][packagist]\n[![Monthly downloads](http:\u002F\u002Fimg.shields.io\u002Fpackagist\u002Fdm\u002Fmustache\u002Fmustache.svg?style=flat-square)][packagist]\n\n\n## Installation\n\n```\ncomposer require mustache\u002Fmustache\n```\n\n## Usage\n\nA quick example:\n\n```php\n\u003C?php\n$m = new \\Mustache\\Engine(['entity_flags' => ENT_QUOTES]);\necho $m->render('Hello {{planet}}', ['planet' => 'World!']); \u002F\u002F \"Hello World!\"\n```\n\n\nAnd a more in-depth example -- this is the canonical Mustache template:\n\n```php\n\u003C?php\n$template = '\nHello {{name}}\nYou have just won {{value}} dollars!\n{{#in_ca}}\nWell, {{taxed_value}} dollars, after taxes.\n{{\u002Fin_ca}}';\n```\n\n\nCreate a view \"context\" object -- which could also be an associative array, but those don't do functions quite as well:\n\n```php\n\u003C?php\nclass Chris {\n    public $name  = \"Chris\";\n    public $value = 10000;\n\n    public function taxed_value() {\n        return $this->value - ($this->value * 0.4);\n    }\n\n    public $in_ca = true;\n}\n```\n\n\nAnd render it:\n\n```php\n\u003C?php\n$m = new \\Mustache\\Engine(['entity_flags' => ENT_QUOTES]);\n$chris = new \\Chris;\necho $m->render($template, $chris);\n```\n\n*Note:* we recommend using `ENT_QUOTES` as a default of [entity_flags][entity_flags] to decrease the chance of Cross-site scripting vulnerability.\n\n\n## And That's Not All!\n\nRead [the Mustache.php documentation][docs] for more information.\n\n\n## Upgrading from v2.x\n_Mustache.php v3.x drops support for PHP 5.2–5.5_, but is otherwise backwards compatible with v2.x.\n\nTo ease the transition, previous behavior can be preserved via configuration:\n\n - The `strict_callables` config option now defaults to `true`. Lambda sections should use closures or callable objects. To continue supporting array-style callables for lambda sections (e.g. `[$this, 'foo']`), set `strict_callables` to `false`.\n - [A context shadowing bug from v2.x has been fixed](https:\u002F\u002Fgithub.com\u002Fbobthecow\u002Fmustache.php\u002Fcommit\u002F66ecb327ce15b9efa0cfcb7026fdc62c6659b27f), but if you depend on the previous buggy behavior you can preserve it via the `buggy_property_shadowing` config option.\n - By default the return value of higher-order sections that are rendered via the lambda helper will no longer be double-rendered. To preserve the previous behavior, set `double_render_lambdas` to `true`. _This is not recommended._\n\nIn order to maintain a wide PHP version support range, there are minor changes to a few interfaces, which you might need to handle if you extend Mustache (see [c0453be](https:\u002F\u002Fgithub.com\u002Fbobthecow\u002Fmustache.php\u002Fcommit\u002Fc0453be5c09e7d988b396982e29218fcb25b7304)).\n\n\n## See Also\n\n - [mustache(5)][manpage] man page.\n - [Readme for the Ruby Mustache implementation][ruby].\n\n\n[mustache]:     https:\u002F\u002Fmustache.github.io\u002F\n[packagist]:    https:\u002F\u002Fpackagist.org\u002Fpackages\u002Fmustache\u002Fmustache\n[entity_flags]: https:\u002F\u002Fgithub.com\u002Fbobthecow\u002Fmustache.php\u002Fwiki#entity_flags\n[docs]:         https:\u002F\u002Fgithub.com\u002Fbobthecow\u002Fmustache.php\u002Fwiki\u002FHome\n[manpage]:      https:\u002F\u002Fmustache.github.io\u002Fmustache.5.html\n[ruby]:         https:\u002F\u002Fgithub.com\u002Fmustache\u002Fmustache\u002Fblob\u002Fmaster\u002FREADME.md\n","Mustache.php 是一个用 PHP 实现的 Mustache 模板引擎。它支持通过简洁的模板语法将数据渲染成 HTML 或其他文本格式，核心功能包括变量替换、条件判断和循环等，并且能够处理复杂的数据结构如对象方法调用。此项目采用了 MIT 许可证，安装方便（通过 Composer 即可），并且提供了详细的文档与示例代码来帮助开发者快速上手。适用于需要在 PHP 项目中使用逻辑简单但表达力强的模板系统来生成页面内容或邮件正文等各种场景。","2026-06-11 03:18:32","top_language"]