Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use js2php to transpile itself to create a PHP-only version of it #14

Open
imme64 opened this issue Nov 4, 2021 · 1 comment
Open
Assignees

Comments

@imme64
Copy link
Collaborator

imme64 commented Nov 4, 2021

As a Proof Of Concept we could use js2php to transpile itself (including its dependencies) to pure PHP so that it can be used even if no NodeJS is available.

This would

  1. show that js2php can transpile a seriously complex application.
  2. make js2php usable in pure PHP environments.

Achieving this would need some effort because we need to implement for example require(). But if we would succeed, we would push the project from a pure prototype to a really usable application.

@imme64
Copy link
Collaborator Author

imme64 commented Jan 5, 2022

Hi @sstur,

I was able to create a version of the project which is 100% PHP: js2php-implemented-in-php.tar.gz, invocation: php js2php.php --test

This proves that js2php has the potential to be a fullblown JavaScript engine for PHP. Only problem is poor performance (around 75x slower than NodeJS). I'll open a new issue regarding performance.

Best,

Immanuel

@imme64 imme64 self-assigned this Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant