{"library":"php-transpiler","title":"php-transpiler","description":"A transpiler that converts PHP AST (from php-parser) into JavaScript code. Version 0.4.0 is the latest stable release. The package is mature but sees infrequent updates. It differentiates by targeting the php-parser AST format, enabling automated PHP-to-JS conversion for server-side rendering or migration. Supports conversion of control structures, function calls, and basic output.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install php-transpiler"],"cli":null},"imports":["import { generate } from 'php-transpiler';","import { transpiler } from 'php-transpiler';","import { parse } from 'php-parser';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { generate } from 'php-transpiler';\nimport { parse } from 'php-parser';\n\nconst phpCode = '<?php echo \"Hello World\";';\nconst ast = parse(phpCode);\nconst jsCode = generate(ast);\nconsole.log(jsCode);\n// Output: module.exports = function($php) { $php.stdout.print('hello world'); };","lang":"javascript","description":"Demonstrates transpiling PHP code to JavaScript using php-parser for parsing and php-transpiler for generation.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}