-
Notifications
You must be signed in to change notification settings - Fork 175
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
Way to compile php file and create standalone .exe so others can execute #189
Comments
You can create small programm in C and attach to end of exe file archive with PHP interpreter and your PHP scripts. You programm shoud unpack archive from itself into temporary dir and execute PHP |
Have you done this before? |
It could be possible to compile it using something like PeachPie. I haven't tried compiling anything written with this library just yet, but since it doesn't require a new PHP extension and appears to rely on IPC, it should work just fine provided the other dependencies are with it the finished product (and where the library expects them) It may provide you with a few more files than a single standalone EXE though, but maybe significantly less than what you're working with if you're asking to compile them together. Another option could be a PHAR archive (a good compiler for these is box), which essentially ZIPs all your project files and dependencies into a single archive, slaps a PHP stub script in front of the ZIP header, and then calls it a day (I'm simplifying a bit). Essentially you end up with one file that contains your application, libraries, and dependencies that is callable just by doing |
To add to what other have siad, there is also rapidexe but it will work only on windows. You can manually bundle your runtime so even if its a touch old, it will work with any php version/config (or other runtime) you need. |
Is there a way to do this?
The text was updated successfully, but these errors were encountered: