https://github.com/gwleuverink/embedded-php
Package a PHP script as a standalone cross-platform binary
https://github.com/gwleuverink/embedded-php
Last synced: 4 months ago
JSON representation
Package a PHP script as a standalone cross-platform binary
- Host: GitHub
- URL: https://github.com/gwleuverink/embedded-php
- Owner: gwleuverink
- Created: 2025-02-08T23:16:02.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-09T00:34:32.000Z (4 months ago)
- Last Synced: 2025-02-09T01:26:09.492Z (4 months ago)
- Language: Go
- Size: 10.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Proof of Concept
> [!WARNING]
> **Abandoned – But Not in Vain!**
>
> This was a great educational exercise. While I've learned static-php & phpmicro already solve the problem, building cross-platform executables is still complex.
>
> I'm building a opinionated CLI tool to make it stupidly simple — stay tuned! 👀Package a PHP script as a standalone cross-platform binary
**Note this PoC only compiles for Mac arm at this time.**
1. This project uses [NativePHP's static binaries](https://github.com/NativePHP/php-bin), so after cloning first run `composer install`.
2. You need to have Go installed on your machine to cross-compile for your desired architecture.To compile the script in `php/app.php` run:
```bash
./build.sh
```Afterwards a binary should be present in `./build/mac-arm` 🚀