Glayzzle is a PHP-to-JavaScript transpiler and CLI that allows running PHP scripts using Node.js or in the browser. As of version 0.3.0 (released circa 2016), it is a proof-of-concept with limited functionality: basic PHP syntax transpilation, file execution via CLI, and a simple server mode using Node.js cluster. It does not support many PHP features like PDO, dynamic variable names, or full function libraries. The project appears to be pre-alpha and is not suitable for production use. Differentiators: transpiles PHP to JS using generators/promises for async I/O, targets Node.js ecosystem.
npm install glayzzleNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use Glayzzle programmatically to transpile and execute a simple PHP echo statement in Node.js.
Do not use for production. Check feature list before using.
Look for alternatives like phpto.js or use php-wasm in browser.
Use WSL or Docker on Windows.
Use promises and avoid blocking I/O patterns.
Rewrite PHP logic in JavaScript or use polyfills.
npm install php-parser
const { Glayzzle } = require('glayzzle')Simplify PHP code or use alternative transpiler.
Run npx glz instead of glz, or install globally with npm install -g glayzzle