{"id":15654518,"url":"https://github.com/jbboehr/php-handlebars","last_synced_at":"2025-10-09T01:34:25.079Z","repository":{"id":26608009,"uuid":"30063117","full_name":"jbboehr/php-handlebars","owner":"jbboehr","description":"PHP bindings for handlebars.c","archived":false,"fork":false,"pushed_at":"2024-09-28T21:56:33.000Z","size":1331,"stargazers_count":30,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T02:12:10.004Z","etag":null,"topics":["c","deus-vult","handlebars","handlebars-js","pecl","php","php-bindings","php-extension","php-extensions","php-handlebars"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jbboehr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-30T08:22:46.000Z","updated_at":"2024-12-31T13:22:12.000Z","dependencies_parsed_at":"2024-10-03T12:52:23.320Z","dependency_job_id":"35faba01-a611-4a62-b807-4bc47f57f273","html_url":"https://github.com/jbboehr/php-handlebars","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbboehr%2Fphp-handlebars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbboehr%2Fphp-handlebars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbboehr%2Fphp-handlebars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbboehr%2Fphp-handlebars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbboehr","download_url":"https://codeload.github.com/jbboehr/php-handlebars/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249167434,"owners_count":21223505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","deus-vult","handlebars","handlebars-js","pecl","php","php-bindings","php-extension","php-extensions","php-handlebars"],"created_at":"2024-10-03T12:52:12.433Z","updated_at":"2025-10-09T01:34:20.035Z","avatar_url":"https://github.com/jbboehr.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# php-handlebars\n\n[![GitHub Build Status](https://github.com/jbboehr/php-handlebars/workflows/ci/badge.svg)](https://github.com/jbboehr/php-handlebars/actions?query=workflow%3Aci)\n[![Coverage Status](https://coveralls.io/repos/jbboehr/php-handlebars/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/jbboehr/php-handlebars?branch=master)\n[![License](https://img.shields.io/badge/license-BSD-brightgreen.svg)](LICENSE.md)\n\nPHP bindings for [handlebars.c](https://github.com/jbboehr/handlebars.c).\n\n\n## Installation\n\n\n### Nix / NixOS\n\n```bash\nnix-env -i -f https://github.com/jbboehr/php-handlebars/archive/v0.9.1.tar.gz\n```\n\nwith a custom version of PHP:\n\n```bash\nnix-env -i -f https://github.com/jbboehr/php-handlebars/archive/v0.9.1.tar.gz \\\n    --arg php '(import \u003cnixpkgs\u003e {}).php73'\n```\n\nor, in a `.nix` file:\n\n```nix\n(import \u003cnixpkgs\u003e {}).callPackage (import (fetchTarball {\n  url = https://github.com/jbboehr/php-handlebars/archive/v0.9.0.tar.gz;\n  sha256 = \"1dgq05b11hg6llfjl8zwxzvixf2g7vn4np4ihcl589jmxdal9np4\";\n})) {}\n```\n\n\n### RPM repository\n\nThe extension is available in [Remi's repository](https://rpms.remirepo.net/):\n\n**Fedora** (change 24 to match your Fedora version)\n\n```bash\ndnf install https://rpms.remirepo.net/fedora/remi-release-24.rpm\ndnf install --enablerepo=remi php-pecl-handlebars\n```\n\n**RHEL/CentOS** (for default PHP in base repository)\n\n```bash\nyum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm\nyum install php-pecl-handlebars\n```\n\n\n### Source\n\nInstall [handlebars.c](https://github.com/jbboehr/handlebars.c)\n\n\n#### Linux / OSX\n\nPrerequisite packages are:\n\n- PHP development headers and tools\n- `gcc` \u003e= 4.4 | `clang` \u003e= 3.x | `vc` \u003e= 11\n- GNU `make` \u003e= 3.81\n- `automake`\n- `autoconf`\n- [`handlebars.c`](https://github.com/jbboehr/handlebars.c) and all of its dependencies (`talloc`, `json-c`, `libyaml`)\n- (optional) [`php-psr`](https://github.com/jbboehr/php-psr)\n\nYou will need the PHP development headers. If PHP was manually installed, these should be available by default. Otherwise, you will need to fetch them from a repository.\n\n```bash\ngit clone https://github.com/jbboehr/php-handlebars.git\ncd php-handlebars\nphpize\n./configure\nmake\nmake test\nsudo make install\n```\n\nIf you have specific PHP versions running:\n\n```bash\ngit clone https://github.com/jbboehr/php-handlebars.git\ncd php-handlebars\n/usr/local/bin/phpize\n./configure --with-php-config=/usr/local/bin/php-config\nmake\nmake test\nsudo make install\n```\n\nAdd the extension to your *php.ini*:\n\n```ini\necho extension=handlebars.so | tee -a /path/to/your/php.ini\n```\n\nFinally, _restart the web server_.\n\n\n## Usage\n\n```php\n$vm = new Handlebars\\VM();\n\necho $vm-\u003erender('{{foo}}', array('foo' =\u003e 'bar'));\n\necho $vm-\u003erenderFile('/path/to/foo.hbs', array('foo' =\u003e 'bar'));\n```\n\nSee the [examples](examples) folder for more examples.\n\n\n## License\n\nThis project is licensed under the [Simplified BSD License](LICENSE.md) (BSD-2-Clause).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbboehr%2Fphp-handlebars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbboehr%2Fphp-handlebars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbboehr%2Fphp-handlebars/lists"}