{"id":19986994,"url":"https://github.com/glayzzle/glayzzle","last_synced_at":"2025-10-10T21:41:07.880Z","repository":{"id":15316488,"uuid":"18046513","full_name":"glayzzle/glayzzle","owner":"glayzzle","description":":rocket: CLI library - PHP transpiler to NodeJS / Javascript ","archived":false,"fork":false,"pushed_at":"2018-03-07T10:59:35.000Z","size":1248,"stargazers_count":24,"open_issues_count":1,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-08-09T07:13:52.530Z","etag":null,"topics":["javascript","language","nodejs","php","transpiler"],"latest_commit_sha":null,"homepage":"http://glayzzle.com","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":"2014-03-23T23:39:03.000Z","updated_at":"2023-08-07T18:44:25.000Z","dependencies_parsed_at":"2022-08-25T20:11:37.958Z","dependency_job_id":null,"html_url":"https://github.com/glayzzle/glayzzle","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/glayzzle/glayzzle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glayzzle%2Fglayzzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glayzzle%2Fglayzzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glayzzle%2Fglayzzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glayzzle%2Fglayzzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glayzzle","download_url":"https://codeload.github.com/glayzzle/glayzzle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glayzzle%2Fglayzzle/sbom","scorecard":{"id":429393,"data":{"date":"2025-08-11","repo":{"name":"github.com/glayzzle/glayzzle","commit":"e59a174e1f5068664cd72a74a9ed7d7abb06576e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T02:57:56.601Z","repository_id":15316488,"created_at":"2025-08-19T02:57:56.601Z","updated_at":"2025-08-19T02:57:56.601Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005419,"owners_count":26083883,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","nodejs","php","transpiler"],"created_at":"2024-11-13T04:32:31.022Z","updated_at":"2025-10-10T21:41:07.863Z","avatar_url":"https://github.com/glayzzle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Glayzzle - PHP to JS transpiler\n===============================\n\nThis is a CLI library in order to run a PHP script using the NodeJS V8 engine.\n\n[![npm version](https://badge.fury.io/js/glayzzle.svg)](https://www.npmjs.com/package/glayzzle)\n[![Gitter](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/glayzzle/Lobby)\n\nWhy (disclaimer) ?\n------------------\n\nI've been a PHP developper for years and now I'm mainly using JavaScript. I will debate about NodeJS versus PHP, because they come with different advantages, and honestly I like both for different reasons.\n\nThe main motivation behind this project is to empower a PHP developper to be able to do the same things you could do with NodeJS or Javascript. \n\nYou are maybe thinking, if a developper wants to do the same thing as a nodejs application can do, why not learn and use directly NodeJS ? Well, here are some personal reasons :\n\n* Learning curve (not a big one, everybody knows JS /@YDKJS) with a new framework/libraries/etc...\n* Grasp Prototypal principles, scopes\n* Habits \u0026 losing landmarks (coding style, core functions)\n* Losing typehinting habits, or dislike Duck Typing\n* Losing SOLID principles / patterns\n* ... and maybe others, [let's chat](https://gitter.im/glayzzle/Lobby) if you want to share your experience\n\nYou are JS purist and Glayzzle hurts your eyes !\n------------------------------------------------\n\nThis project is not made for someone who masters JS and doesn't like PHP. It's just a matter of taste, some guys prefer SOLID vs Duck typing, and may prefer to use a friendly syntax for years instead of learning a new syntax like Typescript.\n\nI do not say it's the best overall solution, you may choose depending on what suits you best.\n\nWhat can you do with it ?\n-------------------------\n\nThe project is still under developpement, so you can't use it yet :smile:.\n\nSeriously, I plan to :\n\n* Handle all PHP structures (namespace, classes, traits, interfaces)\n* Impl a PHP core specific layer (in order to support main PHP functions)\n* Impl a new syntax keyword in order to natively support any Javascript library\n* Impl a native debug support with sourcemaps\n* Impl plugins for gulp/grunt/babel in order to export code for browser\n* Add a support for [apache cordova](https://cordova.apache.org/)\n* Add a support for [electron](http://electron.atom.io/)\n\nThings you can do :\n\n* Write a mobile application\n* Write a GUI application\n* All the [cool stuff](http://blog.teamtreehouse.com/7-awesome-things-can-build-node-js) you can do in NodeJS\n* Write an application for the browser\n* Use frameworks like Vue.JS, SailsJS or Express/Koa\n\nThings you can't do :\n\n* Run an old application (PHP modules like PDO or lib_mysql will not be available)\n* Use a dynamic variable name lookup like `$$var`, I'm not sure I want to degrade overall performance in order to be able to do that\n* Maybe others, work is still in progress\n\nFor JS guys who scream : Don't block the loop !\n-----------------------------------------------\n\nPHP is synchronous, however some implementations with libevent/promises were done as experiments - like [react php](http://reactphp.org/) (BTW the `Hello world` demo is almost the same as NodeJS :wink:)\n\nThe main problem here is how to run a synchronous code without blocking the loop.\n\nMy answer to this is : let I/O tasks run asynchrously, and execute the next statement when the task result is ready.\n\nNow how to do this without breaking the structure flow, and without degrading performances ?\n\nI still need a POC, but I think I will use generators and promises in order to achieve this, the resulting transpiled code will be easy to read and will perform well with a native support.\n\nInstall \u0026 Run :\n---------------\n\n```\nnpm install -g glayzzle\nglz -r \"echo 'hello world';\"\n```\n\nTo run a PHP file you can use the same parameter as PHP :\n\n```\nglz -f your-file.php\n// or\nglz your-file.php\n```\n\nYou can also run a script as a server (using NodeJS cluster module)\n\n```\nglz -S 127.0.0.1:8080 index.php\n```\n\nOther planed things :\n\n* Add a standalone FCGI support in order to run it with Apache/Ngnix\n* Add a generic daemon FCGI server (something similar to php-fcgi)\n\n\nProject Status :\n================\n\nActually the project is a Prof Of Concept, and does not run over all PHP syntax.\n\nHere's my todo list :\n\n- [x] 100% - Develop a [parser/lexer](https://github.com/glayzzle/php-parser)\n- [ ] 10% - Develop a [runtime](https://github.com/glayzzle/php-runtime)\n- [ ] 20% - Develop a [transpiler](https://github.com/glayzzle/php-transpiler)\n- [ ] 15% - Develop a [compatibility layer](https://github.com/glayzzle/php-core)\n- [ ] 0% - Write some awesome demo\n\nIf you want to contribute, fell free to make a pull request or [discuss on the chat](https://gitter.im/glayzzle/Lobby) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglayzzle%2Fglayzzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglayzzle%2Fglayzzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglayzzle%2Fglayzzle/lists"}