Documentation

php2go documentation

A practical user guide: prepare a ZIP, choose an entrypoint, run allowed commands, download the artifact, and understand common compiler errors.

Fast path to the first build
  1. Pack the project into a ZIP without secrets or junk files.
  2. Make sure the entrypoint exists, usually public/index.php.
  3. Run report/check/deps before compile.
  4. Download the artifact and run the binary using README_RUN.
USE CASES

Where php2go is especially useful

php2go does not have to replace the whole PHP stack at once. It is often used to inspect a project, build a portable binary, simplify deployment, or separate the runtime from source code.

history Legacy projects

Run report/check on old code to see dynamic areas, dependencies, and risky spots before deciding on migration.

groups Client websites

Agencies get a repeatable flow: ZIP, diagnostics, build, artifact, and clear run instructions.

rule Technical audit

The report shows unknown functions, classes, fallbacks, and code that is too dynamic for fast generation.

deployed_code Simpler deploy

The team receives one binary with manifest and checksum instead of manually preparing a PHP environment on every server.

How to know if a project fits

Start with report and check. If errors are few, classes resolve, and fallbacks are understandable, the project is a good build candidate.