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.
Overview

Everything you need before uploading a project.

These pages cover the normal user flow from preparing an archive to running the compiled Go binary on a server.

psychology What php2go is

A short explanation of the compiler, build output, and the problems it solves.

account_tree How compilation works

Stages from uploaded archive to ready Go binary.

rule_settings PHP compatibility

What usually works well and where diagnostics are expected.

speed How to write PHP for faster Go

Practices that help the compiler generate direct, fast Go code.

business_center Where php2go is especially useful

Real scenarios where compiling PHP into Go gives clear value.

fact_check How to read report, check, and deps

What the main diagnostic commands and compiler metrics mean.

folder_zip How to prepare a ZIP

Archive structure, what to include and what to keep out.

route Where public/index.php should be

What an entrypoint is and how to change it for custom projects.

terminal Allowed terminal commands

Command whitelist available in the cloud terminal.

dns Production deploy

How to run the compiled binary on a server safely.

shield_lock Security and privacy

What can be sent to the service and what should stay outside the archive.

support_agent How to contact support

What to attach so a compilation issue can be reviewed faster.

play_circle How to run the binary

What to do after downloading the artifact and how to run a web binary.

bug_report Common compiler errors

How to read typical errors and what to send to support.

speed Upload and build limits

ZIP size, file count, timeout, and runner limits.

inventory_2 Runtime and artifact

What is included in the build result and why runtime exists.

Recommended command order

Check the report and diagnostics first, then run compile. It is easier to understand issues before a long build.

php2go report public/index.php
php2go check public/index.php
php2go deps public/index.php
php2go compile --web --bin app-server public/index.php