{"id":19986996,"url":"https://github.com/glayzzle/php-transpiler","last_synced_at":"2025-05-04T08:31:05.121Z","repository":{"id":57323267,"uuid":"79553640","full_name":"glayzzle/php-transpiler","owner":"glayzzle","description":":cactus: Transpiler API to convert php-parser AST to Javascript","archived":false,"fork":false,"pushed_at":"2017-05-04T19:00:15.000Z","size":216,"stargazers_count":22,"open_issues_count":3,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-22T14:54:17.587Z","etag":null,"topics":["javascript","language","php","transpiler"],"latest_commit_sha":null,"homepage":"http://glayzzle.com/php-transpiler/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glayzzle.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-20T11:29:05.000Z","updated_at":"2024-05-18T02:55:03.000Z","dependencies_parsed_at":"2022-09-21T01:01:01.481Z","dependency_job_id":null,"html_url":"https://github.com/glayzzle/php-transpiler","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glayzzle%2Fphp-transpiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glayzzle%2Fphp-transpiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glayzzle%2Fphp-transpiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glayzzle%2Fphp-transpiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glayzzle","download_url":"https://codeload.github.com/glayzzle/php-transpiler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252307765,"owners_count":21727067,"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":["javascript","language","php","transpiler"],"created_at":"2024-11-13T04:32:31.845Z","updated_at":"2025-05-04T08:31:00.106Z","avatar_url":"https://github.com/glayzzle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-transpiler\n\nTranspiler API to convert [php-parser](https://github.com/glayzzle/php-parser) AST to a Javascript output. This library is used to run a php script with :\n\n- [PHP Runtime](https://github.com/glayzzle/php-runtime) - the API compliant with PHP Transpiler output\n- [Glayzzle](https://github.com/glayzzle/glayzzle) - the nodejs CLI that runs PHP Files \n\n\n\n[![npm version](https://badge.fury.io/js/php-transpiler.svg)](https://www.npmjs.com/package/php-transpiler)\n[![Build Status](https://travis-ci.org/glayzzle/php-transpiler.svg?branch=master)](https://travis-ci.org/glayzzle/php-transpiler)\n[![Coverage Status](https://coveralls.io/repos/github/glayzzle/php-transpiler/badge.svg?branch=master\u0026v=0.0.5)](https://coveralls.io/github/glayzzle/php-transpiler?branch=master)\n[![Gitter](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/glayzzle/Lobby)\n\nInstallation\n------------\n\nThis library is distributed with [npm](https://www.npmjs.com/package/php-transpiler) :\n\n```sh\nnpm install php-transpiler --save\n```\n\nUsage\n-----\n\n```js\n// initialize the php parser factory class\nvar transpiler = require('php-transpiler');\nvar instance = new transpiler({\n  browser: true // says if we generate code for browser or nodejs\n});\n\nvar jsCode = instance.read('\u003c?php echo \"Hello World\";');\nconsole.log(jsCode);\n```\n\nWill output :\n\n```\nmodule.exports = function($php) {\n  $php.stdout.print ('hello world');\n};\n```\n\n# Misc\n\nThis library is released under BSD-3 license clause.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglayzzle%2Fphp-transpiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglayzzle%2Fphp-transpiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglayzzle%2Fphp-transpiler/lists"}